function gauth_google_services_scopes in Google Auth 7
Same name and namespace in other branches
- 8 gauth.module \gauth_google_services_scopes()
- 7.2 gauth.module \gauth_google_services_scopes()
Returns a array services api versions.
3 calls to gauth_google_services_scopes()
- gauth_login_gauth_google_response in gauth_login/
gauth_login.module - Implementation of hook_gauth_google_response().
- gauth_login_user_login_submit in gauth_login/
gauth_login.module - Login using google, submit handler
- gauth_response_handler in ./
gauth.module - Function to handle authentication and response from google.
File
- ./
gauth.module, line 223 - Google Auth Api for drupal.
Code
function gauth_google_services_scopes($services) {
if (!$services) {
return FALSE;
}
if (!is_array($services)) {
$services = array(
$services,
);
}
$cache = cache_get_multiple($services, 'cache_gauth_scopes');
if (!empty($cache)) {
$scopes = array();
foreach ($cache as $s => $c) {
if ($c->data) {
$scopes = array_merge($scopes, $c->data);
}
}
return $scopes;
}
else {
$services = array_flip($services);
$scopes = _gauth_read_scope_info();
return array_intersect_key($scopes, $services);
}
}