You are here

function signup_form_submit in Signup 7

Same name and namespace in other branches
  1. 5.2 signup.module \signup_form_submit()
  2. 5 signup.module \signup_form_submit()
  3. 6.2 includes/signup_form.inc \signup_form_submit()
  4. 6 includes/signup_form.inc \signup_form_submit()

Submit handler for the user signup form.

Parameters

array $form: The form being submitted.

array $form_values: The state of the form, including the submitted values.

File

includes/signup_form.inc, line 114
Code for the form when users sign up.

Code

function signup_form_submit($form, &$form_state) {
  if (isset($form_state['values']['signup_username'])) {
    $accounts = user_load_multiple(array(), array(
      'name' => $form_state['values']['signup_username'],
    ));
    foreach ($accounts as $account) {
      $form_state['values']['uid'] = $account->uid;
    }
  }
  signup_sign_up_user($form_state['values']);
}