Merge pull request #10774 from sunnysideup/patch-26

BUG: fix issue where default admin without valid email can not be saved
This commit is contained in:
Guy Sartorelli 2023-06-09 19:06:26 +12:00 committed by GitHub
commit 848768dfeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -774,7 +774,7 @@ class Member extends DataObject
if ((Director::isLive() || Injector::inst()->get(MailerInterface::class) instanceof TestMailer)
&& $this->isChanged('Password')
&& $this->record['Password']
&& $this->Email
&& Email::is_valid_address($this->Email ?? '')
&& static::config()->get('notify_password_change')
&& $this->isInDB()
) {