function fbconnect_login_autoconnect_form in Facebook Connect 8.2
Same name and namespace in other branches
- 7.2 fbconnect_login/fbconnect_login.module \fbconnect_login_autoconnect_form()
This form is submitted by javascript when Facebook session is detected.
1 string reference to 'fbconnect_login_autoconnect_form'
- fbconnect_login_init in fbconnect_login/
fbconnect_login.module - Implements hook_init().
File
- fbconnect_login/
fbconnect_login.module, line 509 - Login functionality for Facebook Connect module
Code
function fbconnect_login_autoconnect_form($form) {
$form['#id'] = 'fbconnect-autoconnect-form';
if (arg(0) == 'user' && in_array(arg(1), array(
'login',
'register',
'password',
)) && !isset($_GET['destination'])) {
$form['#action'] = url('user');
}
else {
$form['#action'] = url($_GET['q'], array(
'query' => drupal_get_destination(),
));
}
if (variable_get('fbconnect_ssl', FALSE)) {
$form['#https'] = TRUE;
}
$form['connect'] = array(
'#type' => 'submit',
'#value' => 'Connect',
);
return $form;
}