Password reset mail could take several hours. After fix only a couple of seconds...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 8 Jan 2019 22:41:40 +0000 (23:41 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 8 Jan 2019 22:41:40 +0000 (23:41 +0100)
includes/current_user.inc

index edfae0a92b2b8b6725f0d39f32dc8109cee79d87..c3d162e037e1d440175cfd6f6118f0a6c2b01d46 100644 (file)
@@ -158,8 +158,14 @@ class current_user
                        $hash = md5($password);
 
                        update_user_password($user['id'], $user['user_id'], $hash);
                        $hash = md5($password);
 
                        update_user_password($user['id'], $user['user_id'], $hash);
-
-                       mail($email, _("New password for")." ".$SysPrefs->app_title, $password);
+                       
+                       $sender = get_company_pref('email');
+                       if (empty($sender))
+                               $header = "";
+                       else
+                               $header = "From: $sender";
+
+                       mail($email, _("New password for")." ".$SysPrefs->app_title, $password, $header);
 
                        return true;
                }
 
                        return true;
                }