function lightbox2_form_user_login_block_alter in Lightbox2 7.2
Same name and namespace in other branches
- 8 lightbox2.module \lightbox2_form_user_login_block_alter()
- 6 lightbox2.module \lightbox2_form_user_login_block_alter()
- 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 1594 - 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') {
$form['#action'] = url('user/login/lightbox2', array(
'query' => array(
'destination' => $_GET['destination'],
),
));
}
}