You are here

public function views_handler_filter_user_name::admin_summary in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/user/views_handler_filter_user_name.inc \views_handler_filter_user_name::admin_summary()
  2. 6.2 modules/user/views_handler_filter_user_name.inc \views_handler_filter_user_name::admin_summary()

Display the filter on the administrative summary.

Overrides views_handler_filter_in_operator::admin_summary

File

modules/user/views_handler_filter_user_name.inc, line 171
Definition of views_handler_filter_user_name.

Class

views_handler_filter_user_name
Filter handler for usernames.

Code

public function admin_summary() {

  // Set up $this->value_options for the parent summary.
  $this->value_options = array();
  if ($this->value) {
    $result = db_query("SELECT * FROM {users} u WHERE uid IN (:uids)", array(
      ':uids' => $this->value,
    ));
    foreach ($result as $account) {
      if ($account->uid) {
        $this->value_options[$account->uid] = $account->name;
      }
      else {

        // Intentionally NOT translated.
        $this->value_options[$account->uid] = 'Anonymous';
      }
    }
  }
  return parent::admin_summary();
}