You are here

function oauth2_user_get in OAuth2 Login 8

Same name in this branch
  1. 8 oauth2_user/profile.inc \oauth2_user_get()
  2. 8 oauth2_user/oauth2_user.api.php \oauth2_user_get()
Same name and namespace in other branches
  1. 7.2 oauth2_user/profile.inc \oauth2_user_get()
  2. 7.2 oauth2_user/oauth2_user.api.php \oauth2_user_get()

Get the profile of the oauth2 user.

File

oauth2_user/profile.inc, line 10
OAuth2 user profile.

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();
  }
}