function views_handler_field_user::init

Same name in other branches
  1. 7.x-3.x modules/user/views_handler_field_user.inc \views_handler_field_user::init()

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 12

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';
    }
}