00001 <?php 00002 00008 class views_handler_filter_user_current extends views_handler_filter_boolean_operator { 00009 function construct() { 00010 parent::construct(); 00011 $this->value_value = t('Is the logged in user'); 00012 } 00013 00014 function query() { 00015 $this->ensure_my_table(); 00016 00017 $field = $this->table_alias . '.' . $this->real_field . ' '; 00018 $or = db_or(); 00019 00020 if (empty($this->value)) { 00021 $or->condition($field, '***CURRENT_USER***', '<>'); 00022 if ($this->accept_null) { 00023 $or->isNull($field); 00024 } 00025 } 00026 else { 00027 $or->condition($field, '***CURRENT_USER***', '='); 00028 } 00029 $this->query->add_where($this->options['group'], $or); 00030 } 00031 }