[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Add local groups to meta=globaluserinfo output

2017-12-02 Thread jenkins-bot (Code Review)
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 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Add local groups to meta=globaluserinfo output

2017-12-02 Thread Reedy (Code Review)
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 

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