You are here

public function OpenIDConnect::userPropertiesIgnore in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 2.x 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.

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

File

src/OpenIDConnect.php, line 163

Class

OpenIDConnect
Main service of the OpenID Connect module.

Namespace

Drupal\openid_connect

Code

public function userPropertiesIgnore(array $context = []) {
  $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);

  // Invoke deprecated hook with deprecation error message.
  $this->moduleHandler
    ->alterDeprecated('hook_openid_connect_user_properties_to_skip_alter() is deprecated and will be removed in 8.x-2.0.', 'openid_connect_user_properties_to_skip', $properties_ignore, $context);
  $properties_ignore = array_unique($properties_ignore);
  return array_combine($properties_ignore, $properties_ignore);
}