function og_views_handler_argument_uid in Organic groups 5
Same name and namespace in other branches
- 5.8 og_views.inc \og_views_handler_argument_uid()
- 5.3 og_views.inc \og_views_handler_argument_uid()
Custom argument for filtering by groups that a user is subscribed to
1 string reference to 'og_views_handler_argument_uid'
File
- ./
og_views.inc, line 375
Code
function og_views_handler_argument_uid($op, &$query, $a1, $a2 = null) {
switch ($op) {
case 'filter':
$query
->ensure_table('og_uid');
$query
->add_where("og_uid.uid = %d", $a2);
break;
case 'title':
// This returns the title for this node in the title, breadcrumb, etc.
return db_result(db_query('SELECT name FROM {users} WHERE uid = %d', $a2));
}
}