You are here

function openid_connect_username_exists in OpenID Connect / OAuth client 8

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

Check if a user name already exists.

Parameters

string $name: A name to test.

Return value

bool TRUE if a user exists with the given name, FALSE otherwise.

Deprecated

in openid_connect:8.x-1.0-beta6 and is removed from openid_connect:8.x-2.0. No replacement is intended. The new method Drupal\openid_connect\OpenIDConnect::usernameExists() or \Drupal::service('openid_connect.openid_connect')->usernameExists() will be set protected for the OpenID Connect service.

See also

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

File

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

Code

function openid_connect_username_exists($name) {
  @trigger_error("openid_connect_username_exists() is deprecated in openid_connect:8.x-1.0-beta6 and is removed from openid_connect:8.x-2.0. No replacement is intended. The new method Drupal\\openid_connect\\OpenIDConnect::usernameExists() or \\Drupal::service('openid_connect.openid_connect')->usernameExists() will be set protected for the OpenID Connect service. See https://www.drupal.org/project/openid_connect/issues/2961938", E_USER_DEPRECATED);
  return \Drupal::service('openid_connect.openid_connect')
    ->usernameExists($name);
}