X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fregister.php;h=4c0860e6e3f3362a9ace2b2a732886114e95a85b;hb=21c63e8b650ff599ca48c94c01c6583dc88f96f3;hp=eb6fda737fc69cf22e8216e9ac8e9a3643658671;hpb=a7302daf96e37c0b6609e222419172150674a25a;p=friendica.git diff --git a/mod/register.php b/mod/register.php index eb6fda737f..4c0860e6e3 100644 --- a/mod/register.php +++ b/mod/register.php @@ -48,8 +48,6 @@ function register_post(&$a) { } - require_once('include/user.php'); - $arr = $_POST; $arr['blocked'] = $blocked; @@ -81,20 +79,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:
login: %s
password: %s

You can change your password after login.'), + $user['email'], + $result['password'] + ). EOL + ); } } elseif($a->config['register_policy'] == REGISTER_APPROVE) { @@ -135,7 +138,7 @@ function register_post(&$a) { 'source_link' => $a->get_baseurl()."/admin/users/", 'link' => $a->get_baseurl()."/admin/users/", 'source_photo' => $a->get_baseurl() . "/photo/avatar/".$user['uid'].".jpg", - 'to_email' => $admin['mail'], + 'to_email' => $admin['email'], 'uid' => $admin['uid'], 'language' => ($admin['language']?$admin['language']:'en')) );