From 3811372d7361314f0f185190d2797ae24d467dd8 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 21 Jul 2007 01:00:42 +0000 Subject: [PATCH] Introduce 'UserGetRights' hook; see docs/hooks.txt for more information --- RELEASE-NOTES | 1 + docs/hooks.txt | 4 ++++ includes/User.php | 1 + 3 files changed, 6 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 65936dab7f..a5fea50f38 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -151,6 +151,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN inline, as in most browsers * Pass the user as an argument to 'isValidPassword' hook callbacks; see docs/hooks.txt for more information +* Introduce 'UserGetRights' hook; see docs/hooks.txt for more information == Bugfixes since 1.10 == diff --git a/docs/hooks.txt b/docs/hooks.txt index 8777be87f2..c1c62a3ae3 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -650,6 +650,10 @@ $article: article object watched $user: user that watched $article: article object that was watched +'UserGetRights': Called in User::getRights() +$user: User to get rights for +&$rights: Current rights + 'UserEffectiveGroups': Called in User::getEffectiveGroups() $user: User to get groups for &$groups: Current effective groups diff --git a/includes/User.php b/includes/User.php index 838b67ef2e..ddbfd23d02 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1595,6 +1595,7 @@ class User { function getRights() { if ( is_null( $this->mRights ) ) { $this->mRights = self::getGroupPermissions( $this->getEffectiveGroups() ); + wfRunHooks( 'UserGetRights', array( $this, &$this->mRights ) ); } return $this->mRights; } -- 2.20.1