function oauth2_user_is_authenticated in OAuth2 Login 8
Same name in this branch
- 8 oauth2_user/oauth2_user.api.php \oauth2_user_is_authenticated()
- 8 oauth2_user/authenticate.inc \oauth2_user_is_authenticated()
Same name and namespace in other branches
- 7.2 oauth2_user/oauth2_user.api.php \oauth2_user_is_authenticated()
- 7.2 oauth2_user/authenticate.inc \oauth2_user_is_authenticated()
Return true if the user has a valid oauth2 access_token.
2 calls to oauth2_user_is_authenticated()
- oauth2_user_get_from_server in oauth2_user/
profile.inc - Get the profile of the oauth2 user from the server.
- oauth2_user_init in oauth2_user/
authenticate.inc - Implements hook_init().
File
- oauth2_user/
authenticate.inc, line 21 - Misc utility functions.
Code
function oauth2_user_is_authenticated() {
$access_token = oauth2_login_get_access_token($redirect = FALSE);
return $access_token ? TRUE : FALSE;
}