Merged revisions 43384 via svnmerge from

svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.1.0-rc3oriwave2

........
  r43384 | hsmith | 2007-10-15 09:20:44 +1300 (Mon, 15 Oct 2007) | 1 line
  
  Added additional checks so that the email doesn't get sent to new members, or on the test site.
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49784 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-02-19 00:31:57 +00:00
parent 0cce4a1d4a
commit 4ba805020a

View File

@ -450,7 +450,10 @@ class Member extends DataObject {
} }
} }
if($this->changed['Password'] && Member::$notify_password_change) $this->sendInfo('changePassword'); if(Director::isLive() &&
$this->ID &&
$this->changed['Password'] &&
Member::$notify_password_change) $this->sendInfo('changePassword');
parent::onBeforeWrite(); parent::onBeforeWrite();
} }