rabin 2 years ago
parent
commit
5298e81b82
1 changed files with 2 additions and 2 deletions
  1. 2 2
      service/agent/src/Auth.php

+ 2 - 2
service/agent/src/Auth.php

@@ -25,7 +25,7 @@ class Auth
         if (!$user) {
             Dever::alert('登录失败,手机号错误,请重新输入');
         }
-        if ($pass && ($user['password'] != sha1($pass) && $user['password'] != sha1(md5($pass)))) {
+        if ($pass && ($user['password'] != sha1($pass) && $user['old_pwd'] != md5($pass. $user['old_salt']))) {
             Dever::alert('登录失败,密码错误,请重新输入');
         }
 
@@ -52,7 +52,7 @@ class Auth
         if (!$user) {
             Dever::alert('登录失败,手机号错误,请重新输入');
         }
-        if ($pass && ($user['password'] != sha1($pass) && $user['password'] != sha1(md5($pass)))) {
+        if ($pass && ($user['password'] != sha1($pass) && $user['old_pwd'] != md5($pass. $user['old_salt']))) {
             Dever::alert('登录失败,密码错误,请重新输入');
         }