You are here

function gauth_login_load_google_id in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth_login/gauth_login.module \gauth_login_load_google_id()

Function returns uid of passed google id

1 call to gauth_login_load_google_id()
gauth_login_gauth_google_response in gauth_login/gauth_login.module
Implementation of hook_gauth_google_response().

File

gauth_login/gauth_login.module, line 219
Google Auth Api for drupal.

Code

function gauth_login_load_google_id($id) {
  $rs = db_select('gauth_login', 'gl')
    ->fields('gl', array(
    'uid',
  ))
    ->condition('google_id', $id, '=')
    ->execute()
    ->fetchAssoc();
  return empty($rs) ? FALSE : $rs['uid'];
}