From f1ba46ce4220d5fe1b0975ea64810a20822d5287 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Feb 2008 00:38:48 +0000 Subject: [PATCH] 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 --- security/Member.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/security/Member.php b/security/Member.php index 17cc5f589..abd125e40 100644 --- a/security/Member.php +++ b/security/Member.php @@ -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();