function openid_connect_connect_account in OpenID Connect / OAuth client 8
Same name and namespace in other branches
- 7 openid_connect.module \openid_connect_connect_account()
Connect an external OpenID Connect account to a Drupal user account.
Parameters
object $account: The Drupal user object.
string $client_name: The client machine name.
string $sub: The 'sub' property identifying the external account.
Deprecated
in openid_connect:8.x-1.0-beta6 and is removed from openid_connect:8.x-2.0. Use Drupal\openid_connect\OpenIDConnectAuthmap::createAssociation() or \Drupal::service('openid_connect.authmap')->createAssociation() instead.
See also
https://www.drupal.org/project/openid_connect/issues/2961938
File
- ./
openid_connect.module, line 361 - Hook implementations of the OpenID Connect module.
Code
function openid_connect_connect_account($account, $client_name, $sub) {
@trigger_error("openid_connect_connect_account() is deprecated in openid_connect:8.x-1.0-beta6 and is removed from openid_connect:8.x-2.0. Use Drupal\\openid_connect\\OpenIDConnectAuthmap::createAssociation() or \\Drupal::service('openid_connect.authmap')->createAssociation() instead. See https://www.drupal.org/project/openid_connect/issues/2961938", E_USER_DEPRECATED);
\Drupal::service('openid_connect.authmap')
->createAssociation($account, $client_name, $sub);
}