ソースを参照

修复登录注册去掉国际区号验证

jason 1 年間 前
コミット
1ed307e451
2 ファイル変更5 行追加3 行削除
  1. 2 1
      application/common/library/Auth.php
  2. 3 2
      application/common/model/Users.php

+ 2 - 1
application/common/library/Auth.php

@@ -234,7 +234,8 @@ class Auth
     {
         //$field = Validate::is($account, 'email') ? 'email' : (Validate::regex($account, '/^1\d{10}$/') ? 'mobile' : 'username');
         $user = Users::where('mobile', $account)
-                    ->find();
+            ->where('is_delete',0)
+            ->find();
         if (!$user) {
             $this->setError('Account is incorrect');
             return false;

+ 3 - 2
application/common/model/Users.php

@@ -28,8 +28,9 @@ class Users extends Model
      */
     public static function getByCodeAndMobile($code, $mobile)
     {
-        $info = self::where('code', $code)
-            ->where('mobile', $mobile)
+        $info = self::where('mobile', $mobile)
+            //->where('code', $code)
+            ->where('is_delete', 0)
             ->find();
         return $info;
     }