You are here

function ajax_register_user_login_ajax_callback in Ajax Login/Register 7.4

Ajax callback for USER LOGIN form.

File

./ajax_register.module, line 256

Code

function ajax_register_user_login_ajax_callback($form, $form_state) {
  if (!form_get_errors()) {
    $commands = _ajax_register_execute_form('login', $form_state);
    return array(
      '#type' => 'ajax',
      '#commands' => $commands,
    );
  }

  // Reload form if it didn't pass validation.
  return $form;
}