You are here

function openid_connect_create_user in OpenID Connect / OAuth client 8

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

Creates a user indicating sub-id and login provider.

Parameters

string $sub: The subject identifier.

array $userinfo: The user claims, containing at least 'email'.

string $client_name: The machine name of the client.

int $status: The initial user status.

Return value

object|false The user object or 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::createUser() or \Drupal::service('openid_connect.openid_connect')->createUser() instead.

See also

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

File

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

Code

function openid_connect_create_user($sub, array $userinfo, $client_name, $status = 1) {
  @trigger_error("openid_connect_create_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::createUser() or \\Drupal::service('openid_connect.openid_connect')->createUser() instead. See https://www.drupal.org/project/openid_connect/issues/2961938", E_USER_DEPRECATED);
  return \Drupal::service('openid_connect.openid_connect')
    ->createUser($sub, $userinfo, $client_name, $status);
}