Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -650,6 +650,10 @@ |
651 | 651 | $user: user that watched |
652 | 652 | $article: article object that was watched |
653 | 653 | |
| 654 | +'UserGetRights': Called in User::getRights() |
| 655 | +$user: User to get rights for |
| 656 | +&$rights: Current rights |
| 657 | + |
654 | 658 | 'UserEffectiveGroups': Called in User::getEffectiveGroups() |
655 | 659 | $user: User to get groups for |
656 | 660 | &$groups: Current effective groups |
Index: trunk/phase3/includes/User.php |
— | — | @@ -1595,6 +1595,7 @@ |
1596 | 1596 | function getRights() { |
1597 | 1597 | if ( is_null( $this->mRights ) ) { |
1598 | 1598 | $this->mRights = self::getGroupPermissions( $this->getEffectiveGroups() ); |
| 1599 | + wfRunHooks( 'UserGetRights', array( $this, &$this->mRights ) ); |
1599 | 1600 | } |
1600 | 1601 | return $this->mRights; |
1601 | 1602 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -151,6 +151,7 @@ |
152 | 152 | inline, as in most browsers |
153 | 153 | * Pass the user as an argument to 'isValidPassword' hook callbacks; see |
154 | 154 | docs/hooks.txt for more information |
| 155 | +* Introduce 'UserGetRights' hook; see docs/hooks.txt for more information |
155 | 156 | |
156 | 157 | == Bugfixes since 1.10 == |
157 | 158 | |