function genpass_admin_create_validate in Generate Password 7.2
Form validate function to set a password value.
1 string reference to 'genpass_admin_create_validate'
- genpass_form_user_register_form_alter in ./
genpass.module - Implements hook_form_FORM_ID_alter().
File
- ./
genpass.module, line 64 - Genpass module: automatically sets strong passwords.
Code
function genpass_admin_create_validate($form, &$form_state) {
$password = genpass_genpass();
// If the site wants to show the password, show it.
if (variable_get('genpass_display_password', FALSE)) {
drupal_set_message(t('The automatically generated password is: %password.', array(
'%password' => $password,
)));
}
form_set_value($form['account']['pass'], $password, $form_state);
return $form;
}