You are here

function oauth2_user_save in OAuth2 Login 8

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

Save the profile of the user on session.

2 calls to oauth2_user_save()
oauth2_user_get_from_server in oauth2_user/profile.inc
Get the profile of the oauth2 user from the server.
oauth2_user_hybridauth_user_login in oauth2_user/profile.inc
Implements hook_hybridauth_user_login().

File

oauth2_user/oauth2_user.api.php, line 23
Functions that can be used by other modules.

Code

function oauth2_user_save($oauth2_user) {

  // Allow other modules to customize the oauth2 user profile.
  drupal_alter('oauth2_user', $oauth2_user);
  $_SESSION['oauth2_user']['profile'] = $oauth2_user;
}