You are here

function views_handler_field_user::render_link in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 modules/user/views_handler_field_user.inc \views_handler_field_user::render_link()
  2. 7.3 modules/user/views_handler_field_user.inc \views_handler_field_user::render_link()
2 calls to views_handler_field_user::render_link()
views_handler_field_user::render in modules/user/views_handler_field_user.inc
Render the field.
views_handler_field_user_mail::render in modules/user/views_handler_field_user_mail.inc
Render the field.
2 methods override views_handler_field_user::render_link()
views_handler_field_user_language::render_link in modules/user/views_handler_field_user_language.inc
views_handler_field_user_name::render_link in modules/user/views_handler_field_user_name.inc

File

modules/user/views_handler_field_user.inc, line 36

Class

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

Code

function render_link($data, $values) {
  if (!empty($this->options['link_to_user']) && user_access('access user profiles') && $values->{$this->aliases['uid']} && $data !== NULL && $data !== '') {
    $this->options['alter']['make_link'] = TRUE;
    $this->options['alter']['path'] = "user/" . $values->{$this->aliases['uid']};
  }
  return $data;
}