You are here

function openid_connect_save_userinfo in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 7 openid_connect.module \openid_connect_save_userinfo()

Saves user profile information into a user account.

Parameters

\Drupal\user\UserInterface $account: An user account object.

array $userinfo: An array with information about the user.

Deprecated

in openid_connect:8.x-1.0-beta6 and is removed from openid_connect:8.x-2.0. Use Drupal\openid_connect\OpenIDConnect::saveUserinfo() or \Drupal::service('openid_connect.openid_connect')->saveUserinfo() instead.

See also

https://www.drupal.org/project/openid_connect/issues/2961938

1 string reference to 'openid_connect_save_userinfo'
OpenIDConnect::saveUserinfo in src/OpenIDConnect.php
Save user profile information into a user account.

File

./openid_connect.module, line 221
Hook implementations of the OpenID Connect module.

Code

function openid_connect_save_userinfo(UserInterface $account, array $userinfo) {
  @trigger_error("openid_connect_save_userinfo() is deprecated in openid_connect:8.x-1.0-beta6 and is removed from openid_connect:8.x-2.0.  Use Drupal\\openid_connect\\OpenIDConnect::saveUserinfo() or \\Drupal::service('openid_connect.openid_connect')->saveUserinfo() instead. See https://www.drupal.org/project/openid_connect/issues/2961938", E_USER_DEPRECATED);
  \Drupal::service('openid_connect.openid_connect')
    ->saveUserinfo($account, $userinfo);
}