Make last remaining user_groups queries honor $wgDisableUserGroupExpiry
authorThis, that and the other <at.light@live.com.au>
Thu, 2 Feb 2017 00:15:38 +0000 (11:15 +1100)
committerThis, that and the other <at.light@live.com.au>
Thu, 2 Feb 2017 00:15:38 +0000 (11:15 +1100)
Follow-up to I94102ceb00398940965280d8742a2747631dcc87

Change-Id: I62952c42b2f6ee1bed0088e17826e19dfc23471c

includes/api/ApiQueryAllUsers.php
includes/specials/pagers/ActiveUsersPager.php

index 21db3ca..136f60e 100644 (file)
@@ -167,7 +167,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                        'ug_user=user_id',
                                        $this->getConfig()->get( 'DisableUserGroupExpiry' ) ?
                                                '1' :
-                                               'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() )
+                                               'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() )
                                ] )
                        ] );
                }
index 1fec05d..0d6f493 100644 (file)
@@ -111,7 +111,9 @@ class ActiveUsersPager extends UsersPager {
                                        'user_groups', '1', [
                                                'ug_user = user_id',
                                                'ug_group' => $group,
-                                               'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() )
+                                               $this->getConfig()->get( 'DisableUserGroupExpiry' ) ?
+                                                       '1' :
+                                                       'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() )
                                        ]
                                ) . ')';
                        }