mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-18 17:38:20 +02:00
Use single quote in raw SQL to fix postgres error
This commit is contained in:
@@ -27,7 +27,7 @@ class CaseInsensitiveEmailExists implements Rule
|
|||||||
public function passes($attribute, $value)
|
public function passes($attribute, $value)
|
||||||
{
|
{
|
||||||
$user = DB::table('users')
|
$user = DB::table('users')
|
||||||
->whereRaw('email = "' . strtolower($value) . '"' . ('sqlite' === config('database.default') ? ' COLLATE NOCASE' : ''))
|
->whereRaw('email = \'' . strtolower($value) . '\'' . ('sqlite' === config('database.default') ? ' COLLATE NOCASE' : ''))
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
return !$user ? false : true;
|
return !$user ? false : true;
|
||||||
|
Reference in New Issue
Block a user