Commit 48a303cb authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

Filter out 'Friends invite' groups from 'groups I can join' (bug#1081194)



User can't join them directly or via site request.

Change-Id: I870011d42e6c6513fec33790739b3c58e375e456
Signed-off-by: default avatarRuslan Kabalin <r.kabalin@lancaster.ac.uk>
parent 37e586a6
......@@ -728,8 +728,8 @@ class PluginSearchInternal extends PluginSearch {
$sql .= 'AND id NOT IN (' . $grouproles . ')';
}
else if ($type == 'canjoin') {
$sql .= 'AND jointype != ? AND id NOT IN (' . $grouproles . ')';
$values[] = 'controlled';
$sql .= 'AND (jointype != ? AND NOT (jointype = ? AND request = 0)) AND id NOT IN (' . $grouproles . ')';
$values = array_merge($values, array('controlled', 'approve'));
}
if (!$canseehidden) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment