Commit 17cd58a0 authored by Ruslan Kabalin's avatar Ruslan Kabalin Committed by Gerrit Code Review
Browse files

Merge "Check change_password method availability on user editing submission (bug #761499)"

parents f5e50bf3 783f554b
......@@ -188,13 +188,15 @@ function edituser_site_validate(Pieform $form, $values) {
}
function edituser_site_submit(Pieform $form, $values) {
global $USER;
global $USER, $authobj;
if (!$user = get_record('usr', 'id', $values['id'])) {
return false;
}
$user->passwordchange = (int) ($values['passwordchange'] == 'on');
if (method_exists($authobj, 'change_password')) {
$user->passwordchange = (int) ($values['passwordchange'] == 'on');
}
$user->quota = $values['quota'];
$user->expiry = db_format_timestamp($values['expiry']);
......
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