You are here

function views_handler_field_last_comment_name in Views (for Drupal 7) 5

1 string reference to 'views_handler_field_last_comment_name'
comment_views_tables in modules/views_comment.inc
This include file implements views functionality on behalf of comment.module

File

modules/views_comment.inc, line 220

Code

function views_handler_field_last_comment_name($fieldinfo, $fielddata, $value, $data) {
  $obj = new stdClass();
  $obj->name = $value;
  $uidfield = $fielddata['tablename'] . "_" . $fieldinfo['uid'];
  $obj->uid = $data->{$uidfield};
  if ($obj->uid != 0) {
    $fieldname = $fielddata['tablename'] . '_name';
    $obj->name = $data->{$fieldname};
  }
  return theme('username', $obj);
}