You are here

function _get_user_fbuid in Facebook Connect 8.2

Same name and namespace in other branches
  1. 6 fbconnect.module \_get_user_fbuid()
  2. 7.2 fbconnect_login/fbconnect_login.module \_get_user_fbuid()

Returns fbuid by uid

Parameters

Int $uid: Drupal user id

Return value

Int $fbuid

7 calls to _get_user_fbuid()
FbconnectTestCase::testLogin in tests/fbconnect.test
fbconnect_get_fbuid in ./fbconnect.module
Check Facebook session.
fbconnect_login_redirect_submit in fbconnect_login/fbconnect_login.module
Redirects the user to the account linking page. @todo refactor it
fbconnect_login_register in fbconnect_login/fbconnect_login.module
Stores user into table fbconnect.
fbconnect_login_theme_user_picture_override in fbconnect_login/fbconnect_login.module
Our replacement for theme('user_picture', ...)

... See full list

File

fbconnect_login/fbconnect_login.module, line 636
Login functionality for Facebook Connect module

Code

function _get_user_fbuid($uid) {
  if ($uid) {
    $query = db_select('fbconnect_users', 'fb_u');
    $query
      ->fields('fb_u', array(
      'fbuid',
    ));
    $query
      ->condition('uid', $uid, '=');
    return $query
      ->execute()
      ->fetchField();
  }
}