Fix approve and welcome email with set password link

This commit is contained in:
champsupertramp
2016-05-19 15:27:48 +08:00
parent 61b11ea4b7
commit 960f519271
4 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -467,14 +467,15 @@ class UM_User {
delete_option( "um_cache_userdata_{$user_id}" );
if ( um_user('account_status') == 'awaiting_admin_review' ) {
$email_tpl = 'approved_email';
$this->password_reset_hash();
$ultimatemember->mail->send( um_user('user_email'), 'approved_email' );
} else {
$email_tpl = 'welcome_email';
$this->password_reset_hash();
$ultimatemember->mail->send( um_user('user_email'), 'welcome_email');
}
$this->set_status('approved');
$ultimatemember->mail->send( um_user('user_email'), $email_tpl );
$this->delete_meta('account_secret_hash');
$this->delete_meta('_um_cool_but_hard_to_guess_plain_pw');
+1 -1
View File
@@ -21,7 +21,7 @@
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Your account e-mail:</span> <span style="font-weight:bold">{email}</span></div>
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Your account username:</span> <span style="font-weight:bold">{username}</span></div>
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Your account password:</span> <span style="font-weight:bold">{password}</span></div>
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Set your password:</span> <span style="font-weight:bold">{password_reset_link}</span></div>
</div>
+1 -1
View File
@@ -21,7 +21,7 @@
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Your account e-mail:</span> <span style="font-weight:bold">{email}</span></div>
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Your account username:</span> <span style="font-weight:bold">{username}</span></div>
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Your account password:</span> <span style="font-weight:bold">{password}</span></div>
<div style="padding: 10px 15px 0 15px;color: #333;"><span style="color:#999">Set your password:</span> <span style="font-weight:bold">{password_reset_link}</span></div>
</div>
+2 -2
View File
@@ -612,7 +612,7 @@ $this->sections[] = array(
'{login_url}' . "\r\n\r\n" .
'Your account e-mail: {email}' . "\r\n" .
'Your account username: {username}' . "\r\n" .
'Your account password: {password}' . "\r\n\r\n" .
'Set your account passowrd: {password_reset_link}' . "\r\n\r\n" .
'If you have any problems, please contact us at {admin_email}' . "\r\n\r\n" .
'Thanks,' . "\r\n" .
'{site_name}',
@@ -712,7 +712,7 @@ $this->sections[] = array(
'{login_url}' . "\r\n\r\n" .
'Your account e-mail: {email}' . "\r\n" .
'Your account username: {username}' . "\r\n" .
'Your account password: {password}' . "\r\n\r\n" .
'Set your account passowrd: {password_reset_link}' . "\r\n\r\n" .
'If you have any problems, please contact us at {admin_email}' . "\r\n\r\n" .
'Thanks,' . "\r\n" .
'{site_name}',