You are here

function auto_username_user_register_submit in Automatic User Names 5

Same name and namespace in other branches
  1. 6 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.

File

./auto_username.module, line 340

Code

function auto_username_user_register_submit($form_id, $form_values) {
  $form_values['name'] = $_SESSION['auto_username']['new_name'];
  unset($_SESSION['auto_username']['new_name']);
  return user_register_submit($form_id, $form_values);
}