function _is_fbconnect_user in Facebook Connect 8.2
Same name and namespace in other branches
- 5 fbconnect.module \_is_fbconnect_user()
- 6 fbconnect.module \_is_fbconnect_user()
- 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
9 calls to _is_fbconnect_user()
- fbconnect_login_authorize_page in fbconnect_login/
fbconnect_login.pages.inc - Menu callback. Called when user perform Facebook registration
- fbconnect_login_autoconnect_form_submit in fbconnect_login/
fbconnect_login.module - Submit handler for autoconnect form.
- fbconnect_login_init in fbconnect_login/
fbconnect_login.module - Implements hook_init().
- fbconnect_login_login_page in fbconnect_login/
fbconnect_login.pages.inc - Menu callback. Logs user into site or redirects.
- fbconnect_login_redirect_submit in fbconnect_login/
fbconnect_login.module - Redirects the user to the account linking page. @todo refactor it
File
- fbconnect_login/
fbconnect_login.module, line 617 - Login functionality for Facebook Connect module
Code
function _is_fbconnect_user($fbuid) {
if ($fbuid) {
$query = db_select('fbconnect_users', 'fbu')
->fields('fbu', array(
'uid',
))
->condition('fbuid', $fbuid, '=');
$user_registered = $query
->execute()
->fetchField();
if (!empty($user_registered)) {
return $user_registered;
}
}
}