function views_handler_argument_comment_user_uid::title

3.x views_handler_argument_comment_user_uid.inc views_handler_argument_comment_user_uid::title()
2.x views_handler_argument_comment_user_uid.inc views_handler_argument_comment_user_uid::title()

Get the title this argument will assign the view, given the argument.

This usually needs to be overridden to provide a proper title.

Overrides views_handler_argument::title

File

modules/comment/views_handler_argument_comment_user_uid.inc, line 8

Class

views_handler_argument_comment_user_uid
Argument handler to accept a user id to check for nodes that user posted or commented on.

Code

function title() {
  if (!$this->argument) {
    $title = variable_get('anonymous', t('Anonymous'));
  }
  else {
    $title = db_result(db_query("SELECT u.name FROM {users} u WHERE u.uid = %d", $this->argument));
  }
  if (empty($title)) {
    return t('No user');
  }

  return check_plain($title);
}