X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fcurrent_user.inc;h=515f6e4e0d57bcd8f04e3c62cd0ff7d3918e0586;hb=bbdff993d6f7a82e8de8b827c008691e037b37eb;hp=cc75e5e87cbef51969b18c35921f667b09200c7e;hpb=ed0785a414d898b8024bb5d30247bb64bf4a968b;p=fa-stable.git diff --git a/includes/current_user.inc b/includes/current_user.inc index cc75e5e8..515f6e4e 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -139,18 +139,18 @@ class current_user set_global_connection(); - $myrow = get_user_by_email($email); + $user = get_user_by_email($email); - if ($myrow['id'] != "") { + if ($user != false) { $bytes = openssl_random_pseudo_bytes(8, $cstrong); $password = base64_encode($bytes); $hash = md5($password); - update_user_password($myrow['id'], $myrow['user_id'], $hash); + update_user_password($user['id'], $user['user_id'], $hash); - mail($myrow['email'], _("New password for")." ".$app_title, $password); + mail($user['email'], _("New password for")." ".$app_title, $password); return true; }