xxxrrrdddd %!s(int64=2) %!d(string=hai) anos
pai
achega
98993ed067
Modificáronse 1 ficheiros con 8 adicións e 6 borrados
  1. 8 6
      application/common/library/Auth.php

+ 8 - 6
application/common/library/Auth.php

@@ -142,12 +142,14 @@ class Auth
         }
         Db::startTrans();
         $find=User::onlyTrashed()->type($extend['type']);
-        if($mobile){
-            $find->where('mobile', $mobile);
-        }
-        if(!empty($extend['openid'])){
-            $find->where('openid',$extend['openid']);
-        }
+        $find->where(function (Query $query)use ($mobile,$extend){
+            if($mobile){
+                $query->where('mobile', $mobile);
+            }
+            if(!empty($extend['openid'])){
+                $query->whereOr('openid',$extend['openid']);
+            }
+        });
         $user=$find->find();
         if (!$user){
             $ip = request()->ip();