From 489f11ce3510e372fe98bc57a3e0d95d7f21c8b6 Mon Sep 17 00:00:00 2001 From: klarkxy <278370456@qq.com> Date: Sun, 15 Mar 2026 13:15:09 +0800 Subject: [PATCH] feat: re-enable nickname editing in user profile - Restore nickname field in modify.php SQL update query - Remove disabled attribute from nickname input in modifypage.php template - Allow users to update their nickname through profile modification - Maintain existing HTML entity encoding for security --- web/modify.php | 4 ++-- web/template/syzoj/modifypage.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/modify.php b/web/modify.php index 522c5a1..d4207d2 100644 --- a/web/modify.php +++ b/web/modify.php @@ -89,14 +89,14 @@ $school = (htmlentities($school, ENT_QUOTES, "UTF-8")); $email = (htmlentities($email, ENT_QUOTES, "UTF-8")); $sql = "UPDATE `users` SET" . "`password`=?," - // . "`nick`=?," //删除此行和81行含的,$nick禁用昵称修改 + . "`nick`=?," . "`school`=?," . "`email`=?" . "WHERE `user_id`=?" ; //echo $sql; //exit(0); -pdo_query($sql, $password, /*$nick,*/ $school, $email, $user_id); +pdo_query($sql, $password, $nick, $school, $email, $user_id); // if ($nick != "") { // $sql = "update solution set nick=? where user_id=?"; // pdo_query($sql, $nick, $user_id); diff --git a/web/template/syzoj/modifypage.php b/web/template/syzoj/modifypage.php index c2d9988..7b85a84 100644 --- a/web/template/syzoj/modifypage.php +++ b/web/template/syzoj/modifypage.php @@ -12,7 +12,7 @@