Fixed testing of member-generated emails

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@58487 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-07-20 22:36:58 +00:00
parent ab28c127d0
commit ac6a3023c0

View File

@ -505,7 +505,9 @@ class Member extends DataObject {
} }
} }
if(Director::isLive() && // We don't send emails out on dev/tests sites to prevent accidentally spamming users.
// However, if TestMailer is in use this isn't a risk.
if((Director::isLive() || Email::mailer() instanceof TestMailer) &&
isset($this->changed['Password']) && $this->changed['Password'] && $this->record['Password'] && isset($this->changed['Password']) && $this->changed['Password'] && $this->record['Password'] &&
Member::$notify_password_change) $this->sendInfo('changePassword'); Member::$notify_password_change) $this->sendInfo('changePassword');