function userprotect_disable_password in User protect 5
After build function to disable password fields.
Parameters
$form The built form.:
$form_values The built form's values.:
Return value
The form with the password fields marked to disable (since the #disabled property is invoked prior to after build, the disabling needs to be done manually via an attribute.
File
- ./
userprotect.module, line 306
Code
function userprotect_disable_password($form, $form_values) {
$form['pass1']['#attributes']['disabled'] = 'disabled';
$form['pass2']['#attributes']['disabled'] = 'disabled';
return $form;
}