- if you want to verify the old password, you should compare it against
the OLD and not the NEW password ;-)
- fix database calls
In other words: changing the password in users/password.php works again ;-)
users/password.php:
- switch from obsolete change_pass() to change_pw()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@916 a1433add-5e2c-0410-b055-b7f2511e0802
$result = db_query("SELECT * FROM $table_mailbox WHERE username='$username' AND active='$active'");
$result = db_query("SELECT password FROM $table_mailbox WHERE username='$username' AND active='$active'");
$result = $result['result'];
$result = db_assoc($result['result']);
if ($new_db_password != $result['password']) { # TODO: comparison might fail because pacrypt() didn't know the salt above (separate pacrypt call?)
db_log ('CONSOLE', $domain, 'edit_password', "FAILURE: " . $this->username); # TODO: replace hardcoded CONSOLE - class is used by XMLRPC and users/
if (pacrypt($old_password, $result['password']) != $result['password']) {
db_log ('CONSOLE', $domain, 'edit_password', "MATCH FAILURE: " . $this->username); # TODO: replace hardcoded CONSOLE - class is used by XMLRPC and users/
$this->errormsg[] = 'Passwords do not match'; # TODO: make translatable
$this->errormsg[] = 'Passwords do not match'; # TODO: make translatable