Thread:Project:Support desk/Hiding toolbox except for admin and bureaucrat/reply (2)

Hi!

You can go through the file includes/User.php to see, which methods are available for the user object. If there should be no method, which returns, if the user is an admin, then maybe you can work with the method getEffectiveGroups somehow like so:

if ( in_array( 'sysop', $this->getUser->getEffectiveGroups ) { // code to show toolbox }

Maybe you still have to adjust that somehow, like using $wgUser instead of $this->getUser and maybe by checking for _both_ groups, but I guess you get the basic idea.