You are here

public function Name::init in Views (for Drupal 7) 8.3

Add uid in the query so we can test for anonymous if needed.

Overrides User::init

File

lib/Views/user/Plugin/views/field/Name.php, line 29
Definition of Views\user\Plugin\views\field\Name.

Class

Name
Field handler to provide simple renderer that allows using a themed user link.

Namespace

Views\user\Plugin\views\field

Code

public function init(ViewExecutable $view, &$data) {
  parent::init($view, $data);
  if (!empty($this->options['overwrite_anonymous']) || !empty($this->options['format_username'])) {
    $this->additional_fields['uid'] = 'uid';
  }
}