Fixed source compatibility to PHP 5.0, fixed bug in epassword reset feature.
[fa-stable.git] / includes / current_user.inc
index fa676ec2cc570b93b379b01b8f0a48ea99004a65..62d729b628963c11f352412f549b42faa7f886bd 100644 (file)
@@ -154,14 +154,12 @@ class current_user
 
                if ($user != false) {
 
-                       $bytes = openssl_random_pseudo_bytes(8, $cstrong);
-                       $password   = base64_encode($bytes);
-
+                       $password = generate_password();
                        $hash = md5($password);
 
                        update_user_password($user['id'], $user['user_id'], $hash);
 
-                       mail($myrow['email'], _("New password for")." ".$SysPrefs->app_title, $password);
+                       mail($email, _("New password for")." ".$SysPrefs->app_title, $password);
 
                        return true;
                }