File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -179,14 +179,22 @@ public function findByCredentials(array $credentials): ?User
179179
180180 // any of the credentials used should be case-insensitive
181181 foreach ($ credentials as $ key => $ value ) {
182- $ this ->where ('LOWER( ' . $ this ->db ->protectIdentifiers ("users. {$ key }" ) . ') ' , strtolower ($ value ));
182+ $ this ->where (
183+ 'LOWER( ' . $ this ->db ->protectIdentifiers ("users. {$ key }" ) . ') ' ,
184+ strtolower ($ value )
185+ );
183186 }
184187
185188 if (! empty ($ email )) {
186- $ data = $ this ->select ('users.*, auth_identities.secret as email, auth_identities.secret2 as password_hash ' )
189+ $ data = $ this ->select (
190+ 'users.*, auth_identities.secret as email, auth_identities.secret2 as password_hash '
191+ )
187192 ->join ('auth_identities ' , 'auth_identities.user_id = users.id ' )
188193 ->where ('auth_identities.type ' , Session::ID_TYPE_EMAIL_PASSWORD )
189- ->where ('LOWER( ' . $ this ->db ->protectIdentifiers ('auth_identities.secret ' ) . ') ' , strtolower ($ email ))
194+ ->where (
195+ 'LOWER( ' . $ this ->db ->protectIdentifiers ('auth_identities.secret ' ) . ') ' ,
196+ strtolower ($ email )
197+ )
190198 ->asArray ()
191199 ->first ();
192200
You can’t perform that action at this time.
0 commit comments