You are here

function fancy_login_forms in Fancy Login 7.3

Same name and namespace in other branches
  1. 6.2 fancy_login.module \fancy_login_forms()
  2. 7.2 fancy_login.module \fancy_login_forms()

Implements hook_forms().

Aliases the following list of forms so that we can alter them in hook_form_alter() for use in the Fancy Login modal, while leaving them unaltered anywhere else they may exist on the site.

Aliases form: user_login_block() alias: fancy_login_user_login_block()

form: user_pass() alias: fancy_login_user_pass()

form: user_register_form() alias: fancy_login_user_register_form()

File

./fancy_login.module, line 63
Holds hooks for the Fancy Login module.

Code

function fancy_login_forms($form_id, $args) {
  $forms = array();

  // Alias the user_login_block() form.
  if ($form_id == 'fancy_login_user_login_block') {
    $forms['fancy_login_user_login_block'] = array(
      'callback' => 'user_login_block',
    );
  }
  elseif ($form_id == 'fancy_login_user_pass') {
    $forms['fancy_login_user_pass'] = array(
      'callback' => 'user_pass',
    );
  }
  elseif ($form_id == 'fancy_login_user_register_form') {
    $forms['fancy_login_user_register_form'] = array(
      'callback' => 'user_register_form',
    );
  }
  return $forms;
}