You are here

public function OpenIDConnect::userPropertiesIgnore in OpenID Connect / OAuth client 2.x

Same name and namespace in other branches
  1. 8 src/OpenIDConnect.php \Drupal\openid_connect\OpenIDConnect::userPropertiesIgnore()

Return user properties that can be ignored when mapping user profile info.

Parameters

array $context: Optional: Array with context information, if this function is called within the context of user authorization. Defaults to an empty array.

Return value

array User properties to ignore.

1 call to OpenIDConnect::userPropertiesIgnore()
OpenIDConnect::saveUserinfo in src/OpenIDConnect.php
Save user profile information into a user account.

File

src/OpenIDConnect.php, line 194

Class

OpenIDConnect
Main service of the OpenID Connect module.

Namespace

Drupal\openid_connect

Code

public function userPropertiesIgnore(array $context = []) : array {
  $properties_ignore = [
    'uid',
    'uuid',
    'langcode',
    'preferred_langcode',
    'preferred_admin_langcode',
    'name',
    'pass',
    'mail',
    'status',
    'created',
    'changed',
    'access',
    'login',
    'init',
    'roles',
    'default_langcode',
  ];
  $this->moduleHandler
    ->alter('openid_connect_user_properties_ignore', $properties_ignore, $context);
  $properties_ignore = array_unique($properties_ignore);
  return array_combine($properties_ignore, $properties_ignore);
}