Skip to content

Commit 6ea6187

Browse files
committed
fix: findByCredentials() returns User object for empty email
1 parent 494be43 commit 6ea6187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/UserModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function findByCredentials(array $credentials): ?User
185185
);
186186
}
187187

188-
if (! empty($email)) {
188+
if ($email !== null) {
189189
$data = $this->select(
190190
'users.*, auth_identities.secret as email, auth_identities.secret2 as password_hash'
191191
)

0 commit comments

Comments
 (0)