From 6a9f62339733a9b52de27e74f26867a7dad06020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B5=A9=E6=96=8C?= Date: Thu, 23 Jan 2025 10:30:39 +0800 Subject: [PATCH] Update user_df_change.php --- trunk/web/admin/user_df_change.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trunk/web/admin/user_df_change.php b/trunk/web/admin/user_df_change.php index e43f48cb5e4..22e15c74efb 100644 --- a/trunk/web/admin/user_df_change.php +++ b/trunk/web/admin/user_df_change.php @@ -4,6 +4,10 @@ $user_id=$_GET['cid']; //echo htmlentities($user_id,ENT_QUOTE,'UTF-8'); if(!isset($_SESSION[$OJ_NAME.'_'.'administrator'])) exit(); +if($_SESSION[$OJ_NAME."_user_id"]==$user_id){ + echo "Can't defunct yourself!"; + exit(0); +} $sql="select `defunct`,email FROM `users` WHERE `user_id`=?"; $result=pdo_query($sql,$user_id); $num=count($result);