+ if ( $this->groups !== [] ) {
+ $tables[] = 'user_groups';
+ $conds[] = 'ug_user = user_id';
+ $conds['ug_group'] = $this->groups;
+ }
+ if ( $this->excludegroups !== [] ) {
+ foreach ( $this->excludegroups as $group ) {
+ $conds[] = 'NOT EXISTS (' . $dbr->selectSQLText(
+ 'user_groups', '1', [ 'ug_user = user_id', 'ug_group' => $group ]
+ ) . ')';
+ }
+ }