wugg 3 yıl önce
ebeveyn
işleme
1f32a067e4
1 değiştirilmiş dosya ile 2 ekleme ve 5 silme
  1. 2 5
      application/Admin/controller/Account.php

+ 2 - 5
application/Admin/controller/Account.php

@@ -274,11 +274,10 @@ class Account extends Base
         }
 
         $pasword = isset($this->post['password']) && $this->post['password'] !== "" ? trim($this->post['password']) : "";
-        if ($pasword != "") {
+        if ($pasword != "" && $info['password'] != sha1($pasword.$info['salt'])) {
             $salt = makeSalt();
             $info['password'] = sha1($pasword . $salt);
             $info['pwd'] = $pasword;
-
         }
         $starttime = isset($this->post['starttime']) && $this->post['starttime'] !== "" ? $this->post['starttime'] : "";
         if ($starttime != "") {
@@ -297,9 +296,7 @@ class Account extends Base
         $info['updatetime'] = date("Y-m-d H:i:s");
         $rela = Db::name("account_info")->alias("a")->Join("fc_rela_account b", "b.account_info=a.id", "left")->where(["b.accountid" => $id])->field("a.*")->find();
         $nickname = isset($this->post['nickname']) && $this->post['nickname'] !== "" ? trim($this->post['nickname']) : "";
-        if ($nickname != "") {
-            $rela['nickname'] = $nickname;
-        }
+        $rela['nickname'] = $nickname;
         $mobile = isset($this->post['mobile']) && $this->post['mobile'] !== "" ? trim($this->post['mobile']) : "";
         if ($mobile != "") {
             $rela['mobile'] = $mobile;