fix email to new registerd users.
fix notification in case of error sending email.
This commit is contained in:
parent
6db73c0b6d
commit
3ac5e4508b
4 changed files with 12 additions and 7 deletions
|
@ -81,20 +81,25 @@ function register_post(&$a) {
|
|||
set_pconfig($user['uid'],'system','invites_remaining',$num_invites);
|
||||
}
|
||||
|
||||
send_register_open_eml(
|
||||
$res = send_register_open_eml(
|
||||
$user['email'],
|
||||
$a->config['sitename'],
|
||||
$a->get_baseurl(),
|
||||
$user['username'],
|
||||
$result['password']);
|
||||
|
||||
|
||||
if($res) {
|
||||
info( t('Registration successful. Please check your email for further instructions.') . EOL ) ;
|
||||
goaway(z_root());
|
||||
}
|
||||
else {
|
||||
notice( t('Failed to send email message. Here is the message that failed.') . $email_tpl . EOL );
|
||||
notice(
|
||||
sprintf(
|
||||
t('Failed to send email message. Here your accout details:<br> login: %s<br> password: %s<br><br>You can change your password after login.'),
|
||||
$user['email'],
|
||||
$result['password']
|
||||
). EOL
|
||||
);
|
||||
}
|
||||
}
|
||||
elseif($a->config['register_policy'] == REGISTER_APPROVE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue