#1049: Fixed crypt() calling

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2020-02-26 19:52:33 +01:00
parent c0b1df9bb1
commit e169c09c4c
3 changed files with 11 additions and 10 deletions

View File

@ -577,7 +577,7 @@ class ModelUserAuth extends Model {
if($username == "" || $password == ""){ return 0; }
$query = $this->db->query("UPDATE " . TABLE_USER . " SET password=? WHERE uid=(SELECT uid FROM " . TABLE_EMAIL . " WHERE email=?)",
array(crypt($password, '$6$' . generate_random_string()), $username));
[encrypt_password($password), $username]);
$rc = $this->db->countAffected();