Reedy has uploaded a new change for review. (
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/17/394817/1
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: newchange
Gerrit-Change-Id: I9e19e7f3d4fcd65777d630628506c195c2f23f84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits