01-10-2009, 10:27 AM
This tutorial is incase you accidentally delete yourself from the admin staff, and there are no other staff.
1: Do NOT! log out off your session. if you already have, you will have to re-install THT. You will notice that the name displayed at the to right will be "". This is okay.
You should be getting weird errors at the top of every page saying something like: "staff id['1'] not found", just ignore these.
2: Open up your file manager and navigate to /yourthtdirectory/admin/index.php
3: in index.php, find:
and replace it with:
4: go back to your logged in null admin account and go to the "add staff" page. Re-Create your staff account.
5: log out of your null account and log back in with your regular account. Viola! Everything is back to normal.
6: IMPORTANT! go back to the index page in step 3 and change it back to normal. If you don't do this, you will have a major security flaw.
*Please note that this is a last resort and SHOULD NOT be attempted if you don't know what you are doing. If this is done wrong, it will mess up you tht installation and you will have to re-install THT. Re-installing THT is the recommended solution if you accidentally delete your last admin account.
1: Do NOT! log out off your session. if you already have, you will have to re-install THT. You will notice that the name displayed at the to right will be "". This is okay.
You should be getting weird errors at the top of every page saying something like: "staff id['1'] not found", just ignore these.
2: Open up your file manager and navigate to /yourthtdirectory/admin/index.php
3: in index.php, find:
PHP Code:
elseif(!$main->checkPerms($page['id']) && $db->num_rows($query) != 0) {
$html = "You don't have access to this page.";
}
PHP Code:
/* elseif(!$main->checkPerms($page['id']) && $db->num_rows($query) != 0) {
$html = "You don't have access to this page.";
}
*/
5: log out of your null account and log back in with your regular account. Viola! Everything is back to normal.
6: IMPORTANT! go back to the index page in step 3 and change it back to normal. If you don't do this, you will have a major security flaw.
*Please note that this is a last resort and SHOULD NOT be attempted if you don't know what you are doing. If this is done wrong, it will mess up you tht installation and you will have to re-install THT. Re-installing THT is the recommended solution if you accidentally delete your last admin account.
Nick - TheHostingTool Staff Coordinator