Sbisson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/269305
Change subject: Add 'reason' to UserGroupsChanged hook
......................................................................
Add 'reason' to UserGroupsChanged hook
Used by Echo to display the reason in the 'user-rights' notifications
Bug: T126277
Change-Id: Ib9bb28a7a77602e3e729fd0bf13ab8259e15b006
---
M docs/hooks.txt
M includes/specials/SpecialUserrights.php
2 files changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/05/269305/1
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 79bc5f5..ce2e680 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3285,6 +3285,7 @@
$added: Groups added
$removed: Groups removed
$performer: User who performed the change, false if via autopromotion
+$reason: The reason, if any, given by the user performing the change
'UserIsBlockedFrom': Check if a user is blocked from a specific page (for
specific block exemptions).
diff --git a/includes/specials/SpecialUserrights.php
b/includes/specials/SpecialUserrights.php
index 7351c33..205b67e 100644
--- a/includes/specials/SpecialUserrights.php
+++ b/includes/specials/SpecialUserrights.php
@@ -292,7 +292,7 @@
$user->invalidateCache();
// update groups in external authentication database
- Hooks::run( 'UserGroupsChanged', array( $user, $add, $remove,
$this->getUser() ) );
+ Hooks::run( 'UserGroupsChanged', array( $user, $add, $remove,
$this->getUser(), $reason ) );
$wgAuth->updateExternalDBGroups( $user, $add, $remove );
wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) . "\n" );
--
To view, visit https://gerrit.wikimedia.org/r/269305
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9bb28a7a77602e3e729fd0bf13ab8259e15b006
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits