function fbconnect_user_identities in Facebook Connect 5
Same name and namespace in other branches
- 6.2 fbconnect.pages.inc \fbconnect_user_identities()
- 6 fbconnect.pages.inc \fbconnect_user_identities()
Menu callback fbconnect identities
1 string reference to 'fbconnect_user_identities'
- fbconnect_menu in ./
fbconnect.module - Implementation of hook_menu().
File
- ./
fbconnect.module, line 371 - This module allows site visitors to connect and register with facebook account
Code
function fbconnect_user_identities($account) {
$header = array(
t('Facebook Connect identities'),
);
$rows[] = array(
t('This website supports Facebook Connect and allow you to log in with your Facebook account.'),
);
if ($account->fbuid) {
$rows[] = array(
t('Your account is linked with your Facebook account.'),
);
if (fbconnect_get_fbuid() && $account->fbuid != fbconnect_get_fbuid()) {
drupal_set_message('Invalid Facebook session, you\'re not authorized to modify the parameters.');
return theme('table', $header, $rows);
}
if (!fbconnect_get_fbuid()) {
$rows[] = array(
t('Open a Facebook session for more settings options.'),
);
$rows[] = array(
fbconnect_render_button(),
);
}
$output = theme('table', $header, $rows);
$output .= drupal_get_form('fbconnect_user_settings_form');
return $output;
}
if (!fbconnect_get_fbuid()) {
$rows[] = array(
t('Click on login button below to link your account on @sitename with your Facebook account.', array(
'@sitename' => variable_get('site_name', t('this website')),
)),
);
$rows[] = array(
fbconnect_render_button(),
);
return theme('table', $header, $rows);
}
$rows[] = array(
t('Facebook session detected, please confirm that you wish to link your @sitename account and Facebook account.', array(
'@sitename' => variable_get('site_name', t('this website')),
)),
);
$output = theme('table', $header, $rows);
$output .= drupal_get_form('fbconnect_association_form');
return $output;
}