You are here

function fancy_login_forms in Fancy Login 6.2

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

Implementation of 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() alias: fancy_login_user_register()

File

./fancy_login.module, line 68

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') {
    $forms['fancy_login_user_register'] = array(
      'callback' => 'user_register',
    );
  }
  return $forms;
}