https://bugzilla.wikimedia.org/show_bug.cgi?id=47338

       Web browser: ---
            Bug ID: 47338
           Summary: Add hook before changing of userrights
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Special pages
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: trollingst...@mail.com
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to