fix: player deleting & password checks work as intended

This commit is contained in:
Martin Ambrus
2017-10-21 11:30:38 +02:00
parent c262fba318
commit 78694da32b
5 changed files with 46 additions and 22 deletions
+5 -2
View File
@@ -123,8 +123,11 @@ class funct {
global $admin,$database;
switch($post['action']){
case "DelPlayer":
$admin->DelPlayer($post['uid'],$post['pass']);
header("Location: ?p=search&msg=ursdel");
if ($admin->DelPlayer($post['uid'],$post['pass'])) {
header("Location: ?p=search&msg=ursdel");
} else {
die('Invalid Admin password, cannot delete player. Please go back and retry.');
}
break;
case "punish":
$admin->Punish($post);