From 4ba805020a705c3a6e9392717327e6b04f04a8f2 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Feb 2008 00:31:57 +0000 Subject: [PATCH] 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 --- security/Member.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/security/Member.php b/security/Member.php index 5ffed1e4d..17cc5f589 100644 --- a/security/Member.php +++ b/security/Member.php @@ -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(); }