function UserData::render

Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render().

Overrides FieldPluginBase::render

File

drupal/core/modules/user/lib/Drupal/user/Plugin/views/field/UserData.php, line 80
Contains \Drupal\user\Plugin\views\field\UserData.

Class

UserData
Provides access to the user data service.

Namespace

Drupal\user\Plugin\views\field

Code

function render($values) {
  $uid = $this
    ->getValue($values);
  $data = $this->userData
    ->get($this->options['module'], $uid, $this->options['name']);

  // Don't sanitize if no value was found.
  if (isset($data)) {
    return $this
      ->sanitizeValue($data);
  }
}