From: Rob Church Date: Sat, 21 Jul 2007 01:00:42 +0000 (+0000) Subject: Introduce 'UserGetRights' hook; see docs/hooks.txt for more information X-Git-Tag: 1.31.0-rc.0~51999 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=3811372d7361314f0f185190d2797ae24d467dd8;p=lhc%2Fweb%2Fwiklou.git Introduce 'UserGetRights' hook; see docs/hooks.txt for more information --- 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; }