1 views_handler_argument_comment_user_uid.inc | views_handler_argument_comment_user_uid::query($group_by = FALSE) |
Set up the query for this argument.
The argument sent may be found at $this->argument.
Overrides views_handler_argument::query
File
- core/
modules/ comment/ views/ views_handler_argument_comment_user_uid.inc, line 42 - Definition of views_handler_argument_comment_user_uid.
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 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);
}