diff --git a/webui/model/user/auth.php b/webui/model/user/auth.php index b054e36..a153a37 100644 --- a/webui/model/user/auth.php +++ b/webui/model/user/auth.php @@ -557,7 +557,7 @@ public function change_password($username = '', $password = '') { if($username == "" || $password == ""){ return 0; } - $query = $this->db->query("UPDATE " . TABLE_USER . " SET password=? WHERE username=?", array(crypt($password), $username)); + $query = $this->db->query("UPDATE " . TABLE_USER . " SET password=? WHERE uid=(SELECT uid FROM " . TABLE_EMAIL . " WHERE email=?)", array(crypt($password), $username)); $rc = $this->db->countAffected();