public function OpenIDConnect::usernameExists in OpenID Connect / OAuth client 2.x
Same name and namespace in other branches
- 8 src/OpenIDConnect.php \Drupal\openid_connect\OpenIDConnect::usernameExists()
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.
1 call to OpenIDConnect::usernameExists()
- OpenIDConnect::generateUsername in src/
OpenIDConnect.php - Generate a username for a new account.
File
- src/
OpenIDConnect.php, line 571
Class
- OpenIDConnect
- Main service of the OpenID Connect module.
Namespace
Drupal\openid_connectCode
public function usernameExists(string $name) : bool {
$users = $this->userStorage
->loadByProperties([
'name' => $name,
]);
return (bool) $users;
}