function views_handler_field_user::init

3.x views_handler_field_user.inc views_handler_field_user::init(&$view, &$data)
2.x views_handler_field_user.inc views_handler_field_user::init(&$view, &$data)

Override init function to provide generic option to link to user.

Overrides views_handler_field::init

1 call to views_handler_field_user::init()
views_handler_field_user_name::init in modules/user/views_handler_field_user_name.inc
Add uid in the query so we can test for anonymous if needed.
1 method overrides views_handler_field_user::init()
views_handler_field_user_name::init in modules/user/views_handler_field_user_name.inc
Add uid in the query so we can test for anonymous if needed.

File

modules/user/views_handler_field_user.inc, line 10

Class

views_handler_field_user
Field handler to provide simple renderer that allows linking to a user.

Code

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