mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:21:59 +01:00
Fix a bug preventing password change for local users
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
fb6675eb73
commit
d975966a7a
@ -557,7 +557,7 @@ class ModelUserAuth extends Model {
|
||||
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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user