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
This commit is contained in:
2026-03-15 13:15:09 +08:00
parent 055223bfdf
commit 489f11ce35
2 changed files with 3 additions and 3 deletions

View File

@@ -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);