You are here

function openid_connect_entity_property_info_alter in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 7 openid_connect.module \openid_connect_entity_property_info_alter()
  2. 2.x openid_connect.module \openid_connect_entity_property_info_alter()

Implements hook_entity_property_info_alter().

File

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

Code

function openid_connect_entity_property_info_alter(&$info) {
  $properties =& $info['user']['properties'];
  if (!isset($properties['timezone'])) {

    // Adds the missing timezone property.
    $properties['timezone'] = [
      'label' => t('Time zone'),
      'description' => t("The user's time zone."),
      'options list' => 'system_time_zones',
      'getter callback' => 'entity_property_verbatim_get',
      'setter callback' => 'entity_property_verbatim_set',
      'schema field' => 'timezone',
    ];
  }
}