delete users (and all perms) fixed

git-svn-id: http://www.observium.org/svn/observer/trunk@2371 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-26 21:27:40 +00:00
parent becdd548cd
commit 2778e4b90d
3 changed files with 101 additions and 86 deletions

View File

@@ -14,12 +14,17 @@ if ($_SESSION['userlevel'] < '10') { include("includes/error-no-perm.inc.php");
if ($_GET['confirm'] == "yes")
{
dbDelete('bill_perms', "`user_id` = ?", array($_GET['user_id']));
dbDelete('devices_perms', "`user_id` = ?", array($_GET['user_id']));
dbDelete('ports_perms', "`user_id` = ?", array($_GET['user_id']));
dbDelete('users_prefs', "`user_id` = ?", array($_GET['user_id']));
dbDelete('users', "`user_id` = ?", array($_GET['user_id']));
if (deluser($_GET['user_id'])) { echo("<span class=info>User '$delete_username' deleted!</span>"); }
}
else
{
echo("<span class=alert>You have requested deletion of the user '$delete_username'. This action can not be reversed.<br /><a href='?page=deluser&action=del&user_id=" . $_GET['user_id'] . "&confirm=yes'>Click to confirm</a></span>");
echo("<div class=errorbox>You have requested deletion of the user '$delete_username'. This action can not be reversed.<br /><a href='?page=deluser&action=del&user_id=" . $_GET['user_id'] . "&confirm=yes'>Click to confirm</a></div>");
}
}