function genpass_form_alter in Generate Password 5
Same name and namespace in other branches
- 8 genpass.module \genpass_form_alter()
- 6 genpass.module \genpass_form_alter()
- 7 genpass.module \genpass_form_alter()
Remove the require on the password, on user creation.
File
- ./
genpass.module, line 6
Code
function genpass_form_alter($form_id, &$form) {
if ($form_id == 'user_register') {
if ($form['pass']) {
$form['pass']['#required'] = FALSE;
$form['#validate']["genpass_register_validate"] = array();
}
else {
if ($form['account']['pass']) {
$form['account']['pass']['#required'] = FALSE;
$form['#validate']["genpass_register_validate2"] = array();
}
}
}
}