Commit 2ef42399 authored by Donal McMullan's avatar Donal McMullan

Rename calls to password_validate to password_validate_user

parent d023735f
......@@ -164,7 +164,7 @@ function accountprefs_validate(Pieform $form, $values) {
$form->set_error('oldpassword', get_string('oldpasswordincorrect', 'account'));
return;
}
password_validate_user($form, $values, $USER);
password_validate($form, $values, $USER);
}
else if ($values['password1'] !== '' || $values['password2'] !== '') {
$form->set_error('oldpassword', get_string('mustspecifyoldpassword'));
......
......@@ -637,7 +637,7 @@ function change_password_validate(Pieform $form, $values) {
$authobj = AuthFactory::create($USER->authinstance);
// @todo this could be done by a custom form rule... 'password' => $user
password_validate_user($form, $values, $USER);
password_validate($form, $values, $USER);
// The password cannot be the same as the old one
if (!$form->get_error('password1')
......
......@@ -161,7 +161,7 @@ function forgotpass_submit(Pieform $form, $values) {
function forgotpasschange_validate(Pieform $form, $values) {
$user = new User();
$user->find_by_id($values['user']);
password_validate_user($form, $values, $user);
password_validate($form, $values, $user);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment