users/password.php:

- update to use non-static MailboxHandler->login()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1492 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 12 years ago
parent 00bc5c6553
commit 3b7606b654

@ -54,8 +54,10 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
flash_error($validpass[0]); # TODO: honor all error messages, not only the first one flash_error($validpass[0]); # TODO: honor all error messages, not only the first one
$error += 1; $error += 1;
} }
if(!MailboxHandler::login($username, $fPassword_current)) { $mh = new MailboxHandler;
if(!$mh->login($username, $fPassword_current)) {
$error += 1; $error += 1;
$pPassword_password_current_text = $PALANG['pPassword_password_current_text_error']; $pPassword_password_current_text = $PALANG['pPassword_password_current_text_error'];
} }
@ -67,7 +69,6 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
if ($error == 0) if ($error == 0)
{ {
$mh = new MailboxHandler();
$mh->init($username); # TODO: error handling $mh->init($username); # TODO: error handling
if($mh->change_pw($fPassword, $fPassword_current) ) { if($mh->change_pw($fPassword, $fPassword_current) ) {
flash_info($PALANG['pPassword_result_success']); flash_info($PALANG['pPassword_result_success']);

Loading…
Cancel
Save