You are here

function views_handler_field_comment_username::render_link in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 modules/comment/views_handler_field_comment_username.inc \views_handler_field_comment_username::render_link()
  2. 7.3 modules/comment/views_handler_field_comment_username.inc \views_handler_field_comment_username::render_link()
1 call to views_handler_field_comment_username::render_link()
views_handler_field_comment_username::render in modules/comment/views_handler_field_comment_username.inc
Render the field.

File

modules/comment/views_handler_field_comment_username.inc, line 32

Class

views_handler_field_comment_username
Field handler to allow linking to a user account or homepage.

Code

function render_link($data, $values) {
  if (!empty($this->options['link_to_user'])) {
    $account->uid = $this
      ->get_value($values, 'uid');
    $account->name = $this
      ->get_value($values);
    $account->homepage = $this
      ->get_value($values, 'homepage');
    return theme('username', $account);
  }
  else {
    return $data;
  }
}