function auto_username_form_user_register_form_alter in Automatic User Names 7
Same name and namespace in other branches
- 8 auto_username.module \auto_username_form_user_register_form_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
auto_username.module, line 41 - Allows a user's username to be assigned based on tokens.
Code
function auto_username_form_user_register_form_alter(&$form, &$form_state, $form_id) {
$form['account']['name']['#type'] = 'hidden';
$form['account']['name']['#value'] = user_password();
}