You are here

function auto_username_user_register_submit in Automatic User Names 6

Same name and namespace in other branches
  1. 5 auto_username.module \auto_username_user_register_submit()

Submit handler for the user regsitration form.

We need to override the submit handler so that we can change the username before the welcome email gets sent out. Unfortunately the email gets sent directly from the form submit handler. Argl.

1 string reference to 'auto_username_user_register_submit'
auto_username_form_alter in ./auto_username.module
Implementation of hook_form_alter().

File

./auto_username.module, line 361

Code

function auto_username_user_register_submit($form, &$form_state) {
  $form_state['values']['name'] = $_SESSION['auto_username']['new_name'];
  unset($_SESSION['auto_username']['new_name']);
  return;
}