function oauth2_user_get in OAuth2 Login 8
Same name in this branch
- 8 oauth2_user/profile.inc \oauth2_user_get()
- 8 oauth2_user/oauth2_user.api.php \oauth2_user_get()
Same name and namespace in other branches
- 7.2 oauth2_user/profile.inc \oauth2_user_get()
- 7.2 oauth2_user/oauth2_user.api.php \oauth2_user_get()
Get the profile of the oauth2 user.
File
- oauth2_user/
oauth2_user.api.php, line 10 - Functions that can be used by other modules.
Code
function oauth2_user_get() {
// If it is already cached, return the cached one.
if (isset($_SESSION['oauth2_user']['profile'])) {
return $_SESSION['oauth2_user']['profile'];
}
else {
return oauth2_user_get_from_server();
}
}