2 次代码提交 09efdce831 ... 9222514608

作者 SHA1 备注 提交日期
  = 9222514608 Merge remote-tracking branch 'origin/master' 2 月之前
  = 4719e793f3 fixed 500 2 月之前
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/Models/User.php

+ 3 - 2
app/Models/User.php

@@ -66,7 +66,7 @@ class User extends BaseModel
     {
         if ($this->full_name) return $this->full_name;
         if($this->name_first || $this->name_last){
-           return $this->name_first . ' ' . $this->name_last; 
+           return $this->name_first . ' ' . $this->name_last;
         }
         return $this->getEmail();
     }
@@ -116,7 +116,8 @@ class User extends BaseModel
     }
 
     public function latestLogInPin(){
-        $loginOrSignupAttempt = LoginOrSignupAttempt::where('email', 'ilike', $this->email)->where('is_valid', true)->orderBy('created_at', 'desc')->first();
+        $loginOrSignupAttempt = LoginOrSignupAttempt::whereRaw('email ilike ' . $this->email)
+            ->where('is_valid', true)->orderBy('created_at', 'desc')->first();
         if($loginOrSignupAttempt){
             return $loginOrSignupAttempt->pin;
         }