Skip to content

Commit fae0c07

Browse files
cedric-annetrasher
authored andcommitted
Fix user group dropdown condition
1 parent 657c52f commit fae0c07

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/Group_User.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,14 @@ public static function showForUser(User $user)
205205
'condition' => [
206206
'is_usergroup' => 1,
207207
] + getEntitiesRestrictCriteria(Group::getTable(), '', '', true)
208-
] + ['NOT' => self::getListForItemParams($user)];
208+
];
209+
210+
if (count($used) > 0) {
211+
$params['condition'][] = [
212+
'NOT' => [Group::getTable() . '.id' => $used]
213+
];
214+
}
215+
209216
Group::dropdown($params);
210217
echo "</td><td>" . _n('Manager', 'Managers', 1) . "</td><td>";
211218
Dropdown::showYesNo('is_manager');

0 commit comments

Comments
 (0)