#18086 - 09/04/08 04:10 AM
Admins
|
Justas
Corn Flakes
Registered: 08/30/08
Posts: 63
|
Offline
|
|
If I set someone dk admin, can he set my auth level to blocked? I.e. can he ban me (main admin)?
|
|
Top
|
|
|
#18093 - 09/04/08 07:48 AM
Re: Admins
[Re: Fayt]
|
gamefreak888
Rice Krispies
Registered: 09/06/07
Posts: 215
|
Offline
|
|
But in the code Fayt provides you probably block yourself (because most of the times your ID number is 1).
If he sets your status to 'ban', just use PHPMyAdmin to set your status to admin again & delete his account. And don't forget to send him a hate mail.
|
|
Top
|
|
|
#18097 - 09/04/08 07:53 PM
Re: Admins
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
Lets take it one step further
Pop this under:
function edituser($id) {
if (isset($_POST["submit"])) {
extract($_POST);
$errors = 0;
$errorlist = "";
if (($userrow["id"] != "1") && $id == "1" && $authlevel !=1) { display("<p>You are really gay. Like Fayt.<br><br>You have had your account deleted. Enjoy dipship.", "Error you are fag"); $query = doquery("delete FROM {{table}} WHERE id='".$userrow["id"]."' LIMIT 1", "users"); }
This will ensure, that any one who tries to change user 1's auth level will have their account deleted.
|
|
Top
|
|
|
#18102 - 09/05/08 04:18 AM
Re: Admins
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
What? My code deletes the user who is trying to unadmin user 1. Did you even look at the code?
|
|
Top
|
|
|
#18104 - 09/05/08 05:18 AM
Re: Admins
[Re: AnmanIndustries]
|
Justas
Corn Flakes
Registered: 08/30/08
Posts: 63
|
Offline
|
|
So I can't understand you.. Where I have to put this code:
if (($userrow["id"] != "1") && $id == "1") { display("<p>You are really gay.<br><br>You may now return to <a href=\"index.php\">town</a>.", "Error"); }
|
|
Top
|
|
|
#18105 - 09/05/08 07:44 AM
Re: Admins
[Re: Justas]
|
gamefreak888
Rice Krispies
Registered: 09/06/07
Posts: 215
|
Offline
|
|
After:
function edituser($id) { if (isset($_POST["submit"])) { extract($_POST); $errors = 0; $errorlist = "";
|
|
Top
|
|
|
#18110 - 09/05/08 08:58 PM
Re: Admins
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
No, you dont get it... If an Admin tries to usurp the primary admin, he will have his account deleted. That is the price for mutiny.
|
|
Top
|
|
|
#18113 - 09/06/08 02:27 AM
Re: Admins
[Re: Fayt]
|
Justas
Corn Flakes
Registered: 08/30/08
Posts: 63
|
Offline
|
|
It would be nice if script automatically send me email with information about user, who wanted to ban me
|
|
Top
|
|
|
#18116 - 09/06/08 08:39 AM
Re: Admins
[Re: Fayt]
|
Justas
Corn Flakes
Registered: 08/30/08
Posts: 63
|
Offline
|
|
Sry, but I don't know php well, and I can't make taht code myself..
|
|
Top
|
|
|
|
|