Introduce 'UserGetRights' hook; see docs/hooks.txt for more information
authorRob Church <robchurch@users.mediawiki.org>
Sat, 21 Jul 2007 01:00:42 +0000 (01:00 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sat, 21 Jul 2007 01:00:42 +0000 (01:00 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/User.php

index 65936da..a5fea50 100644 (file)
@@ -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 ==
 
index 8777be8..c1c62a3 100644 (file)
@@ -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
index 838b67e..ddbfd23 100644 (file)
@@ -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;
        }