Version: 1.00, by pHaez
Developer Last Online: Sep 2003
Version: 2.2.x
Rating:
Released: 01-12-2002
Last Update: Never
Installs: 33
No support by the author.
I find that if you have more that 1 admin, it is kinda a uncomfortable feeling to know that they have the power to modify your user information as well as other admins. They can change your status from administrator to just a registered user, as well as others, and take over the board. This can prevent it.
Security is a touchy area, and this is not proven to be 100% secure, so I will not take responsibility for any problems this hack may cause.
In /admin/user.php you need to do the following:
Step 1.
Look for:
PHP Code:
error_reporting(7);
Below that add:
PHP Code:
unset($canmodifyadmins);
Step 2.
look for:
PHP Code:
// ###################### Start edit #######################
if ($action=="edit") {
$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,
avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
FROM user
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE user.userid=$userid");
Below that add the following:
PHP Code:
if ($user[usergroupid]!=6 or $bbuserinfo[userid]==$user[userid] or checklogperms($canmodifyadmins,1,"<p>Admins are not allowed to edit other admins.</p>")) {
Step 3.
Look For:
PHP Code:
// ###################### Start do update #######################
Above that add the following:
PHP Code:
}
Save that file and open /admin/config.php
Look for:
PHP Code:
?>
Above that add the following:
PHP Code:
$canmodifyadmins = "192";
you can allow others as well by seperating their user id with a comma.
ex.
PHP Code:
$canmodifyadmins = "192,23,22";
That should do it. Lemme know if you have any problems.
[SIZE=3]This is now updated, should be fully operational!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Is there any way to make it so that one of the "lesser" admins can only edit a certain set of templates / style sets? Basically, I want to give an admin complete control over a certain set of forums, but I don't want him accidentally destroying the templates for the rest of the board.
I was going to ask the same questions. Also was going to ask Is it possible to make it so that Admin #1 can still edit lesser admins? Thanks for any help.
Quote:
Originally posted by hellsatan Damn...
I was going to ask 2 things...
1.) Could the "Remove" link be removed?
2.) Could this be targeted to specific users, rather than just general admins...
I would like them to be able to see my profile (unless I blocked them with my hack), but not be able to change my user status, or remove me...
hey can we get an all in one file? with all the bugs fixed and stuff? I dunno what to do, and I also think this is a great idea, but you should be able to it with the admin whos userid is 1, cuz hes the one who made the forums..