jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/394817 )

Change subject: Add local groups to meta=globaluserinfo output
......................................................................


Add local groups to meta=globaluserinfo output

Bug: T181905
Change-Id: I9e19e7f3d4fcd65777d630628506c195c2f23f84
---
M includes/api/ApiQueryGlobalUserInfo.php
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiQueryGlobalUserInfo.php 
b/includes/api/ApiQueryGlobalUserInfo.php
index aa3a7c5..35194eb 100644
--- a/includes/api/ApiQueryGlobalUserInfo.php
+++ b/includes/api/ApiQueryGlobalUserInfo.php
@@ -108,6 +108,11 @@
                                        'editcount' => intval( 
$account['editCount'] ),
                                        'registration' => wfTimestamp( 
TS_ISO_8601, $account['registration'] ),
                                ];
+                               if ( $account['groupMemberships'] ) {
+                                       $a['groups'] = array_keys( 
$account['groupMemberships'] );
+                                       $result->setIndexedTagName( 
$a['groups'], 'group' );
+                               }
+
                                if ( $account['blocked'] ) {
                                        $a['blocked'] = [
                                                'expiry' => 
$this->getLanguage()->formatExpiry(
@@ -134,6 +139,12 @@
                                        'editcount' => $account['editCount'],
                                        'registration' => wfTimestamp( 
TS_ISO_8601, $account['registration'] ),
                                ];
+
+                               if ( $account['groupMemberships'] ) {
+                                       $a['groups'] = array_keys( 
$account['groupMemberships'] );
+                                       $result->setIndexedTagName( 
$a['groups'], 'group' );
+                               }
+
                                if ( $account['blocked'] ) {
                                        $a['blocked'] = [
                                                'expiry' => 
$this->getLanguage()->formatExpiry(

-- 
To view, visit https://gerrit.wikimedia.org/r/394817
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e19e7f3d4fcd65777d630628506c195c2f23f84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to