function openid_connect_connect_current_user in OpenID Connect / OAuth client 8
Same name and namespace in other branches
- 7 openid_connect.module \openid_connect_connect_current_user()
Connect the current user's account to an external provider.
Parameters
object $client: The client.
array $tokens: The tokens as returned from OpenIDConnectClientInterface::retrieveTokens().
Return value
bool TRUE on success, FALSE on failure.
Deprecated
in openid_connect:8.x-1.0-beta6 and is removed from openid_connect:8.x-2.0. Use Drupal\openid_connect\OpenIDConnect::connectCurrentUser() or \Drupal::service('openid_connect.openid_connect')->connectCurrentUser() instead.
See also
https://www.drupal.org/project/openid_connect/issues/2961938
File
- ./
openid_connect.module, line 451 - Hook implementations of the OpenID Connect module.
Code
function openid_connect_connect_current_user($client, array $tokens) {
@trigger_error("openid_connect_connect_current_user() 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::connectCurrentUser() or \\Drupal::service('openid_connect.openid_connect')->connectCurrentUser() instead. See https://www.drupal.org/project/openid_connect/issues/2961938", E_USER_DEPRECATED);
return \Drupal::service('openid_connect.openid_connect')
->connectCurrentUser($client, $tokens);
}