Skip to content

Commit c8cf1fd

Browse files
authored
Merge pull request #88 from fefo-p/develop
Fixes #87
2 parents 44865e2 + 514a9b9 commit c8cf1fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Authentication/LocalAuthenticator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function attempt(array $credentials, bool $remember = null): bool
2222
{
2323
// Always record a login attempt, whether success or not.
2424
$ipAddress = Services::request()->getIPAddress();
25-
$this->recordLoginAttempt($credentials['email'], $ipAddress, $this->user->id ?? null, false);
25+
$this->recordLoginAttempt($credentials['email'] ?? $credentials['username'], $ipAddress, $this->user->id ?? null, false);
2626

2727
$this->user = null;
2828
return false;
@@ -32,7 +32,7 @@ public function attempt(array $credentials, bool $remember = null): bool
3232
{
3333
// Always record a login attempt, whether success or not.
3434
$ipAddress = Services::request()->getIPAddress();
35-
$this->recordLoginAttempt($credentials['email'], $ipAddress, $this->user->id ?? null, false);
35+
$this->recordLoginAttempt($credentials['email'] ?? $credentials['username'], $ipAddress, $this->user->id ?? null, false);
3636

3737
$this->user = null;
3838
return false;

0 commit comments

Comments
 (0)