diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-10-12 12:13:44 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-10-12 12:13:44 +0200 |
commit | cf547be1d6900d12719a9372cbc1a5d433d31863 (patch) | |
tree | 03a525cf40905adafc21b0c4146e467bad288437 /Zotlabs/Module/Lostpass.php | |
parent | 29617737ca2c03c800ebbe4701dc21cf9f25ce22 (diff) | |
parent | 16da1a4e810889448eecbd13d68183a820bcebe2 (diff) | |
download | volse-hubzilla-cf547be1d6900d12719a9372cbc1a5d433d31863.tar.gz volse-hubzilla-cf547be1d6900d12719a9372cbc1a5d433d31863.tar.bz2 volse-hubzilla-cf547be1d6900d12719a9372cbc1a5d433d31863.zip |
Merge branch '1.14RC'
Diffstat (limited to 'Zotlabs/Module/Lostpass.php')
-rw-r--r-- | Zotlabs/Module/Lostpass.php | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/Zotlabs/Module/Lostpass.php b/Zotlabs/Module/Lostpass.php index eeddd0a13..072657d7b 100644 --- a/Zotlabs/Module/Lostpass.php +++ b/Zotlabs/Module/Lostpass.php @@ -43,18 +43,19 @@ class Lostpass extends \Zotlabs\Web\Controller { $subject = email_header_encode(sprintf( t('Password reset requested at %s'),get_config('system','sitename')), 'UTF-8'); - $res = mail($email, $subject , - $message, - 'From: Administrator@' . $_SERVER['SERVER_NAME'] . "\n" - . 'Content-type: text/plain; charset=UTF-8' . "\n" - . 'Content-transfer-encoding: 8bit' ); - - + $res = z_mail( + [ + 'toEmail' => $email, + 'messageSubject' => sprintf( t('Password reset requested at %s'), get_config('system','sitename')), + 'textVersion' => $message, + ] + ); + goaway(z_root()); } - function get() { + function get() { if(x($_GET,'verify')) { @@ -102,20 +103,22 @@ class Lostpass extends \Zotlabs\Web\Controller { $email_tpl = get_intltext_template("passchanged_eml.tpl"); $message = replace_macros($email_tpl, array( - '$sitename' => \App::$config['sitename'], - '$siteurl' => z_root(), - '$username' => sprintf( t('Site Member (%s)'), $email), - '$email' => $email, - '$new_password' => $new_password, - '$uid' => $newuid )); - - $subject = email_header_encode( sprintf( t('Your password has changed at %s'), get_config('system','sitename')), 'UTF-8'); - - $res = mail($email,$subject,$message, - 'From: ' . 'Administrator@' . $_SERVER['SERVER_NAME'] . "\n" - . 'Content-type: text/plain; charset=UTF-8' . "\n" - . 'Content-transfer-encoding: 8bit' ); - + '$sitename' => \App::$config['sitename'], + '$siteurl' => z_root(), + '$username' => sprintf( t('Site Member (%s)'), $email), + '$email' => $email, + '$new_password' => $new_password, + '$uid' => $newuid ) + ); + + $res = z_mail( + [ + 'toEmail' => $email, + 'messageSubject' => sprintf( t('Your password has changed at %s'), get_config('system','sitename')), + 'textVersion' => $message, + ] + ); + return $o; } |