Permalink
Browse files

Make sure we check the current username, since user might have change…

…d it in the form
  • Loading branch information...
flack committed Oct 23, 2017
1 parent ccd7125 commit ca5e16b77431c0a04c90b8638ee146479c4488da
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/org/openpsa/user/validator.php
@@ -40,8 +40,8 @@ public function verify_existing_password(array $fields)
//User has the necessary rights, so we're good
return true;
}
if (!midcom_connection::login($fields["username"], $fields["current_password"])) {
$user = midcom::get()->auth->get_user($fields['person']);
if (!midcom_connection::login($user->username, $fields["current_password"])) {
return [
'current_password' => midcom::get()->i18n->get_string("wrong current password", "org.openpsa.user")
];

0 comments on commit ca5e16b

Please sign in to comment.