|
@@ -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;
|
|
|
}
|