You are here

function _is_fbconnect_user in Facebook Connect 6

Same name and namespace in other branches
  1. 8.2 fbconnect_login/fbconnect_login.module \_is_fbconnect_user()
  2. 5 fbconnect.module \_is_fbconnect_user()
  3. 7.2 fbconnect_login/fbconnect_login.module \_is_fbconnect_user()

Check if user already registered in the fbconnect_users table

Parameters

Int $fbuid: Facebook user id

Return value

Int $uid

8 calls to _is_fbconnect_user()
fbconnect_autoconnect_form_submit in ./fbconnect.module
fbconnect_form_alter in ./fbconnect.module
Impletementation of hook_form_alter.
fbconnect_init in ./fbconnect.module
Implementation of hook_init().
fbconnect_redirect_submit in ./fbconnect.module
Redirects the user to the account linking page.
fbconnect_register in ./fbconnect.module
Store user into table fbconnect

... See full list

File

./fbconnect.module, line 715

Code

function _is_fbconnect_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' AND u.status = 1
SQL;
    return db_result(db_query($query, $fbuid));
  }
}