Skip to content

Commit

Permalink
Update privilege_delete.php
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue authored Jan 23, 2025
1 parent 6a9f623 commit 9fb8190
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trunk/web/admin/privilege_delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!";
Expand Down

0 comments on commit 9fb8190

Please sign in to comment.