diff --git a/trunk/web/admin/privilege_delete.php b/trunk/web/admin/privilege_delete.php index 3cdaa21f680..c9216cbe455 100644 --- a/trunk/web/admin/privilege_delete.php +++ b/trunk/web/admin/privilege_delete.php @@ -7,6 +7,10 @@ if(isset($_GET['uid'])){ $user_id=$_GET['uid']; $rightstr =$_GET['rightstr']; + if($_SESSION[$OJ_NAME."_user_id"]==$user_id && $rightstr=="administrator" ){ + echo "Can't remove administrator for yourself!"; + exit(0); + } $sql="delete from `privilege` where user_id=? and rightstr=?"; $rows=pdo_query($sql,$user_id,$rightstr); echo "$user_id $rightstr deleted!";