You are here

function lightbox2_form_user_login_block_alter in Lightbox2 8

Same name and namespace in other branches
  1. 6 lightbox2.module \lightbox2_form_user_login_block_alter()
  2. 7.2 lightbox2.module \lightbox2_form_user_login_block_alter()
  3. 7 lightbox2.module \lightbox2_form_user_login_block_alter()

Implementation of hook_form_alter().

Update the page action and input size.

Parameters

&$form: General reference used in drupal, defining the structure & the fields of a form.

$form_state: General variable, used to control the processing of the form.

$form_id: The default is "user_login_block"; hold the page where the function is being used.

Return value

Return the structure of the form.

File

./lightbox2.module, line 1662
Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.

Code

function lightbox2_form_user_login_block_alter(&$form, $form_state, $form_id = "user_login_block") {
  if ($form_id == 'user_login_block' && arg(0) == 'user' && arg(1) == 'login' && arg(2) == 'lightbox2') {

    // @FIXME
    // url() expects a route name or an external URI.
    // $form['#action'] = url('user/login/lightbox2', array('query' => array('destination' => $_GET['destination'])));
  }
}