]> git.mxchange.org Git - friendica.git/blobdiff - mod/lostpass.php
don't translate CR-LF
[friendica.git] / mod / lostpass.php
index 20d35133a47db0b6b5e31f3b02f83c9c1699b481..30bdc059c3f8925aa8c5c6b607cd4652daa5038d 100644 (file)
@@ -7,7 +7,8 @@ function lostpass_post(&$a) {
        if(! $email)
                goaway($a->get_baseurl());
 
-       $r = q("SELECT * FROM `user` WHERE `email` = '%s' LIMIT 1",
+       $r = q("SELECT * FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) LIMIT 1",
+               dbesc($email),
                dbesc($email)
        );
        if(! count($r))
@@ -34,9 +35,8 @@ function lostpass_post(&$a) {
                        '$reset_link' => $a->get_baseurl() . '/lostpass?verify=' . $new_password
        ));
 
-       $res = mail($email,"Password reset requested at {$a->config['sitename']}",$email_tpl,"From: Administrator@{$_SERVER[SERVER_NAME]}");
-
-       
+       $res = mail($email, t('Password reset requested at ') . $a->config['sitename'],
+                       $email_tpl, 'From: ' . t('Administrator') . '@' . $_SERVER[SERVER_NAME]);
 
        goaway($a->get_baseurl());
 }