function fb_get_fbu in Drupal for Facebook 6.2
Same name and namespace in other branches
- 5.2 fb.module \fb_get_fbu()
- 5 fb.module \fb_get_fbu()
- 6.3 fb.module \fb_get_fbu()
- 7.3 fb.module \fb_get_fbu()
Given a local user id, find the facebook id.
6 calls to fb_get_fbu()
- fb_app_user in ./
fb_app.module - Implementation of hook_user.
- fb_devel_info in ./
fb_devel.module - fb_devel_page in ./
fb_devel.module - Provides a page with useful debug info.
- fb_devel_user in ./
fb_devel.module - fb_views_handler_author_is_friend::query in fb_views/
fb_views_handler_author_is_friend.inc
File
- ./
fb.module, line 398
Code
function fb_get_fbu($uid, $fb_app = NULL) {
// default to current app (only set if we're in a FB callback)
if (!$fb_app) {
$fb_app = $GLOBALS['_fb_app'];
}
// Accept either a user object or uid passed in.
if (is_object($uid) && $uid->uid && isset($uid->fbu) && $uid->fbu) {
return $uid->fbu;
}
elseif (is_object($uid)) {
$uid = $uid->uid;
}
if ($uid) {
// User management is handled by another module. Use our hook to ask for mapping.
$fbu = fb_invoke(FB_OP_GET_FBU, array(
'fb_app' => $fb_app,
'uid' => $uid,
'fb' => $GLOBALS['_fb'],
));
}
return $fbu;
}