Last modified: 2013-04-18 10:22:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49338, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47338 - Add hook before changing of userrights
Add hook before changing of userrights
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-17 20:46 UTC by Mr. Forzel
Modified: 2013-04-18 10:22 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mr. Forzel 2013-04-17 20:46:22 UTC
I can do it with following code in includes/specials/SpecialUserrights.php:

<pre>
    global $wgUserrightsProtectedUsers;
    if( in_array( User::getCanonicalName( $this->mTarget ), $wgUserrightsProtectedUsers ) ) {
        $out = $this->getOutput();
        $out->setPageTitle( 'Forbidden' );
        $out->addHTML('In the name of Holy Federal Security Service, you can't modify groups of this user.');
        return true;
}
</pre>

More cleanly do it with hook.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links