Merged revisions 46525 via svnmerge from

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

........
  r46525 | sminnee | 2007-12-10 15:10:56 +1300 (Mon, 10 Dec 2007) | 3 lines
  
  Added Member->SetPassword, a field that lets you have a write-only password field
  Used Member->SetPassword to create a password column on the MemberTableField for SecurityAdmin
  Send 'changed password' emails when a user is first created as well as edited
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49793 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-02-19 00:38:48 +00:00
parent 7babce4a66
commit f1ba46ce42

View File

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