Slynderdale
01-14-2003, 10:00 PM
This is just a mini-hack I made, I know theres others like it, but this one is simple and protects admins from being edited, deleted, editing access masks and so on and the options can be changed in config.php, heres the current options:
// which users are allowed to edit the admin usernames
$caneditadmin = "all";
// if they cant edit admins, can they edit them selves?
$caneditadminself = true;
// admins that are protected from others editing them
$protectedadmins = "1";
// can the protected admins edit them selves?
$protectedadminsself = true;
Its pretty much self explanatory, if a unathorized admin tries to edit, delete and so on an admin, they get an error message saying there not allowed to do that.
With the option $caneditadmin, you can control what admins can edit other admins.
With the option $caneditadminself, if set to true, the admin can edit there own account even if there not listed in caneditadmin.
With the option $protectedadmins, no other admin can edit them even of there listed in caneditadmin, this is good for protecting a main admin account from being tampered with.
With the option $protectedadminsself, if set to true, it allows the protected admins to edit there own account.
The $caneditadmin and $protectedadmins can support multiple accounts, each account must be seperated with a comma for example:
$caneditadmin = "1,2,3,6";
or you can use "all" for every admin, for example:
$caneditadmin = "all";
The $caneditadminself and $protectedadminsself can be set to true, if the admin can edit there own account or false if they cant.
// which users are allowed to edit the admin usernames
$caneditadmin = "all";
// if they cant edit admins, can they edit them selves?
$caneditadminself = true;
// admins that are protected from others editing them
$protectedadmins = "1";
// can the protected admins edit them selves?
$protectedadminsself = true;
Its pretty much self explanatory, if a unathorized admin tries to edit, delete and so on an admin, they get an error message saying there not allowed to do that.
With the option $caneditadmin, you can control what admins can edit other admins.
With the option $caneditadminself, if set to true, the admin can edit there own account even if there not listed in caneditadmin.
With the option $protectedadmins, no other admin can edit them even of there listed in caneditadmin, this is good for protecting a main admin account from being tampered with.
With the option $protectedadminsself, if set to true, it allows the protected admins to edit there own account.
The $caneditadmin and $protectedadmins can support multiple accounts, each account must be seperated with a comma for example:
$caneditadmin = "1,2,3,6";
or you can use "all" for every admin, for example:
$caneditadmin = "all";
The $caneditadminself and $protectedadminsself can be set to true, if the admin can edit there own account or false if they cant.