Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with failed login #105

Closed
MichalPB1 opened this issue Sep 12, 2019 · 3 comments
Closed

Error with failed login #105

MichalPB1 opened this issue Sep 12, 2019 · 3 comments

Comments

@MichalPB1
Copy link

Hi,
I am trying to log a user via username + password and if these credentials are wrong I get a error as below:

ErrorException
Undefined index: email
vendor/myth/auth/src/Authentication/LocalAuthenticator.php at line 25
$this->recordLoginAttempt($credentials['email'], $ipAddress, $this->user->id ?? null, false);

I allow to credential via (Config/Auth.php)

    public $validFields = [
        'email', 'username'
    ];
@fefo-p
Copy link
Contributor

fefo-p commented Sep 12, 2019

This was changed a while back.

The line you mention (:25) should be:

$this->recordLoginAttempt($credentials['email'] ?? $credentials['username'], $ipAddress, $this->user->id ?? null, false);

@MGatner
Copy link
Collaborator

MGatner commented Sep 12, 2019

Probably using the beta release instead of branch develop. @MichalPB1 if that’s the case can you update and try again?

@MichalPB1
Copy link
Author

Yes, you're right. Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants