You are here

function _fbconnect_is_user in Facebook Connect 6.2

Check if user already registered in the fbconnect_users table

Parameters

Int $fbuid: Facebook user id

Return value

int The Drupal user ID.

7 calls to _fbconnect_is_user()
fbconnect_autoconnect_form_submit in ./fbconnect.module
@todo.
fbconnect_init in ./fbconnect.module
Implements hook_init().
fbconnect_redirect_submit in ./fbconnect.module
Redirects the user to the account linking page. @todo refactor it
fbconnect_register in ./fbconnect.module
Store user into table fbconnect
fbconnect_register_form_submit in ./fbconnect.pages.inc
@todo.

... See full list

File

./fbconnect.module, line 537
Integration with Facebook Connect API.

Code

function _fbconnect_is_user($fbuid) {
  if ($fbuid) {
    $query = <<<SQL
      SELECT u.uid FROM {users} u
      INNER JOIN {fbconnect_users} f ON u.uid = f.uid
      WHERE fbuid = '%s'
SQL;
    return db_result(db_query($query, $fbuid));
  }
}