diff --git a/security/Member.php b/security/Member.php index 7a8193984..2c6584fea 100644 --- a/security/Member.php +++ b/security/Member.php @@ -471,10 +471,9 @@ class Member extends DataObject implements TemplateGlobalProvider { * @param array $data Additional data to pass to the email (can be used in the template) */ function sendInfo($type = 'signup', $data = null) { + Deprecation::notice('3.0', 'Please use Member_ChangePasswordEmail or Member_ForgotPasswordEmail directly instead'); + switch($type) { - case "signup": - $e = Member_SignupEmail::create(); - break; case "changePassword": $e = Member_ChangePasswordEmail::create(); break; @@ -640,7 +639,10 @@ class Member extends DataObject implements TemplateGlobalProvider { && $this->record['Password'] && Member::$notify_password_change ) { - $this->sendInfo('changePassword'); + $e = Member_ChangePasswordEmail::create(); + $e->populateTemplate($this); + $e->setTo($this->Email); + $e->send(); } // The test on $this->ID is used for when records are initially created. @@ -1477,53 +1479,6 @@ class Member_ProfileForm extends Form { } } -/** - * Class used as template to send an email to new members - * @package framework - * @subpackage security - */ -class Member_SignupEmail extends Email { - protected $from = ''; // setting a blank from address uses the site's default administrator email - protected $subject = ''; - protected $body = ''; - - function __construct() { - parent::__construct(); - $this->subject = _t('Member.EMAILSIGNUPSUBJECT', "Thanks for signing up"); - $this->body = ' -
' . _t('Member.EMAILSIGNUPINTRO1','Thanks for signing up to become a new member, your details are listed below for future reference.') . '
- -' . _t('Member.EMAILSIGNUPINTRO2','You can login to the website using the credentials listed below') . ': -