function fbconnect_get_fbuid in Facebook Connect 6
Same name and namespace in other branches
- 8.2 fbconnect.module \fbconnect_get_fbuid()
- 5 fbconnect.module \fbconnect_get_fbuid()
- 6.2 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
12 calls to fbconnect_get_fbuid()
- fbconnect_autoconnect_form_submit in ./
fbconnect.module - fbconnect_block in ./
fbconnect.module - Implementation of hook_block().
- fbconnect_fbapp_settings in ./
fbconnect.admin.inc - fbconnect_fbapp_settings_submit in ./
fbconnect.admin.inc - fbconnect_footer in ./
fbconnect.module - Implementation of hook_footer().
File
- ./
fbconnect.module, line 483
Code
function fbconnect_get_fbuid($check_connected = false) {
global $user;
if (facebook_client()) {
$fbuid = facebook_client()
->get_loggedin_user();
if ($check_connected && $fbuid) {
if (_get_user_fbuid($user->uid) != $fbuid) {
$fbuid = null;
}
}
return $fbuid;
}
}