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:
@@ -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);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<?php require_once('./include/set_post_key.php');?>
|
||||
<div class="field">
|
||||
<label for="username"><?php echo $MSG_NICK?>*</label>
|
||||
<input disabled="disabled" name="nick" placeholder="<?php echo $MSG_Input.$MSG_NICK?>" type="text" value="<?php echo htmlentities($row['nick'],ENT_QUOTES,"UTF-8")?>">
|
||||
<input name="nick" placeholder="<?php echo $MSG_Input.$MSG_NICK?>" type="text" value="<?php echo htmlentities($row['nick'],ENT_QUOTES,"UTF-8")?>">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="ui header"><?php echo $MSG_PASSWORD?>*</label>
|
||||
|
||||
Reference in New Issue
Block a user