Use correct login to generate password hash when it is changed

This commit is contained in:
Dmitriy Simushev 2015-01-21 11:22:12 +00:00
parent 47ee6edaad
commit c27a0e1aea

View File

@ -219,7 +219,7 @@ class ProfileController extends AbstractController
) + operator_by_id($op_id);
// Set the password only if it's not an empty string.
if ($password !== '') {
$target_operator['vcpassword'] = calculate_password_hash($login, $password);
$target_operator['vcpassword'] = calculate_password_hash($target_operator['vclogin'], $password);
}
// Update operator's fields in the database.
update_operator($target_operator);