function fbconnect_get_fbuid in Facebook Connect 6.2
Same name and namespace in other branches
- 8.2 fbconnect.module \fbconnect_get_fbuid()
- 5 fbconnect.module \fbconnect_get_fbuid()
- 6 fbconnect.module \fbconnect_get_fbuid()
- 7.2 fbconnect.module \fbconnect_get_fbuid()
Check facebook session.
Parameters
boolean $check_connected: ensure that active user is connected with active facebook account
Return value
integer facebook user id
11 calls to fbconnect_get_fbuid()
- fbconnect_autoconnect_form_submit in ./
fbconnect.module - @todo.
- fbconnect_fbapp_settings in ./
fbconnect.admin.inc - @todo.
- fbconnect_fbapp_settings_submit in ./
fbconnect.admin.inc - @todo.
- fbconnect_footer in ./
fbconnect.module - Implements hook_footer().
- fbconnect_get_user_info in ./
fbconnect.module - Query information from facebook user table.
File
- ./
fbconnect.module, line 378 - Integration with Facebook Connect API.
Code
function fbconnect_get_fbuid($check_connected = FALSE) {
global $user;
$client = fbconnect_facebook_client();
if ($client && ($fbuid = $client
->getUser())) {
if ($check_connected && $fbuid) {
if (_fbconnect_get_user_fbuid($user->uid) != $fbuid) {
$fbuid = NULL;
}
}
return $fbuid;
}
}