X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FActiveUsersPager.php;h=0d6f493d596d670da58313aff89ad7783fbf6c4d;hb=7b5a83d384aff1d31da405792fc5753aa1d79a4d;hp=645a1150413efb237ebbac3289a4b046de0dc8a3;hpb=df212f1c916f73ea8e2bdfdf00228d551b8bd620;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/pagers/ActiveUsersPager.php b/includes/specials/pagers/ActiveUsersPager.php index 645a115041..0d6f493d59 100644 --- a/includes/specials/pagers/ActiveUsersPager.php +++ b/includes/specials/pagers/ActiveUsersPager.php @@ -101,12 +101,21 @@ class ActiveUsersPager extends UsersPager { $tables[] = 'user_groups'; $conds[] = 'ug_user = user_id'; $conds['ug_group'] = $this->groups; + if ( !$this->getConfig()->get( 'DisableUserGroupExpiry' ) ) { + $conds[] = 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() ); + } } if ( $this->excludegroups !== [] ) { foreach ( $this->excludegroups as $group ) { $conds[] = 'NOT EXISTS (' . $dbr->selectSQLText( - 'user_groups', '1', [ 'ug_user = user_id', 'ug_group' => $group ] - ) . ')'; + 'user_groups', '1', [ + 'ug_user = user_id', + 'ug_group' => $group, + $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? + '1' : + 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() ) + ] + ) . ')'; } } if ( !$this->getUser()->isAllowed( 'hideuser' ) ) { @@ -165,9 +174,9 @@ class ActiveUsersPager extends UsersPager { $list = []; $user = User::newFromId( $row->user_id ); - $groups_list = self::getGroups( intval( $row->user_id ), $this->userGroupCache ); - foreach ( $groups_list as $group ) { - $list[] = self::buildGroupLink( $group, $userName ); + $ugms = self::getGroupMemberships( intval( $row->user_id ), $this->userGroupCache ); + foreach ( $ugms as $ugm ) { + $list[] = $this->buildGroupLink( $ugm, $userName ); } $groups = $lang->commaList( $list );