function fboauth_fbid_load in Facebook OAuth (FBOAuth) 7
Same name and namespace in other branches
- 6 fboauth.module \fboauth_fbid_load()
- 7.2 fboauth.module \fboauth_fbid_load()
Load a Facebook ID given a Drupal User ID.
4 calls to fboauth_fbid_load()
- fboauth_action_deauth in includes/
fboauth.fboauth.inc - Facebook OAuth callback for deauthorizing the site from Facebook.
- fboauth_block_view in ./
fboauth.module - Implements hook_block_view().
- fboauth_form_user_profile_form_alter in ./
fboauth.module - Implements hook_form_FORM_ID_alter().
- theme_fboauth_user_info in includes/
fboauth.pages.inc - Provided themed information about the user's current Facebook connection.
File
- ./
fboauth.module, line 238
Code
function fboauth_fbid_load($uid = NULL) {
$uid = isset($uid) ? $uid : $GLOBALS['user']->uid;
$result = db_query("SELECT fbid FROM {fboauth_users} WHERE uid = :uid", array(
':uid' => $uid,
));
$fbid = $result
->fetchField();
return $fbid ? $fbid : FALSE;
}