You are here

function user_registrationpassword_form_user_register_alter in User registration password 6

Implements hook_form_FORM_ID_alter() for the user registration form.

File

./user_registrationpassword.module, line 136
Enables password creation on registration form.

Code

function user_registrationpassword_form_user_register_alter(&$form, &$form_state) {
  global $user;
  if (variable_get('user_register', 0) == 1 && variable_get('user_registrationpassword_registration', USER_REGISTRATIONPASS_VERIFICATION_PASS) == USER_REGISTRATIONPASS_VERIFICATION_PASS && $user->uid < 1) {
    $form['#submit'][] = 'user_registrationpassword_form_user_register_submit';
  }
}