rabin 3 년 전
부모
커밋
5298e81b82
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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('登录失败,密码错误,请重新输入');
         }