function views_handler_argument_comment_user_uid::query
Overrides views_handler_argument::query
2 methods override views_handler_argument_comment_user_uid::query()
- views_handler_argument_node_uid_revision::query in modules/
node/ views_handler_argument_node_uid_revision.inc - Set up the query for this argument.
- views_handler_argument_tracker_comment_user_uid::query in modules/
tracker/ views_handler_argument_tracker_comment_user_uid.inc - Set up the query for this argument.
File
-
modules/
comment/ views_handler_argument_comment_user_uid.inc, line 53
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
public function query($group_by = FALSE) {
$this->ensure_my_table();
$subselect = db_select('comment', 'c');
$subselect->addField('c', 'cid');
$subselect->condition('c.uid', $this->argument);
$subselect->where("c.nid = {$this->table_alias}.nid");
$condition = db_or()->condition("{$this->table_alias}.uid", $this->argument, '=')
->exists($subselect);
$this->query
->add_where(0, $condition);
}