Skip to content

Commit

Permalink
BUG: fix issue where default admin without valid email can not be saved
Browse files Browse the repository at this point in the history
It is possible to have a default admin without a valid password. In this case, you can not save Member as it throws an error (email is tried being sent without a valid email address).
  • Loading branch information
sunnysideup authored and GuySartorelli committed Jun 9, 2023
1 parent 6cb3597 commit cdcb229
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Security/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ public function onBeforeWrite()
&& $this->isChanged('Password')
&& $this->record['Password']
&& $this->Email
&& filter_var($this->Email, FILTER_VALIDATE_EMAIL)
&& static::config()->get('notify_password_change')
&& $this->isInDB()
) {
Expand Down

0 comments on commit cdcb229

Please sign in to comment.