X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fcurrent_user.inc;fp=includes%2Fcurrent_user.inc;h=72a97118adbbb31e337e7c3d9cee5d1a972a16f0;hb=d1babda7c01b314d35fb89f2d195553b55936532;hp=87f71b1e45ce2a6c9ee10357bb4f3cc1ae4ee3c1;hpb=b6ae2ddcd0cbc571edd01157ca1c8d44bbe071ef;p=fa-stable.git diff --git a/includes/current_user.inc b/includes/current_user.inc index 87f71b1e..72a97118 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -150,16 +150,16 @@ 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")." ".$SysPrefs->app_title, $password);