From 94d7e894f7f7c749555b2b64c77733b5c63572be Mon Sep 17 00:00:00 2001 From: klarkxy <278370456@qq.com> Date: Sat, 19 Oct 2024 12:46:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E4=BC=9A=E6=8A=8A=E6=98=B5=E7=A7=B0=E4=B8=80=E8=B5=B7?= =?UTF-8?q?=E6=94=B9=E6=8E=89=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/changepass.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/changepass.php b/web/changepass.php index 378bc13..3df9af9 100644 --- a/web/changepass.php +++ b/web/changepass.php @@ -27,7 +27,7 @@ if (isset($OJ_LANG)) { $passwd = $_POST['passwd']; $nick = $_POST['nick']; - if ($nick != "") { + if (isset($nick) && $nick != "") { $sql = "update `users` set `nick`=? where `user_id`=? and user_id not in( select user_id from privilege where rightstr='administrator')"; pdo_query($sql, $nick, $user_id); @@ -36,7 +36,7 @@ if (isset($OJ_LANG)) { } - if ($passwd != "") { + if (isset($passwd) && $passwd != "") { $passwd = pwGen($passwd); $sql = "update `users` set `password`=? where `user_id`=? and user_id not in( select user_id from privilege where rightstr='administrator')"; @@ -59,8 +59,8 @@ if (isset($OJ_LANG)) { value="" type="text" required> -
" - type="text" required>
+
" type="text" required>