Closed rnrstar closed 7 years ago
Hi @rnrstar, this is because you're using username
as the array key when passing the users credentials through Auth::attempt()
when you're actually using email
as your Laravel username key.
This:
$auth = Auth::attempt(['username'=> $username, 'password'= $password]);
Should be corrected to:
$auth = Auth::attempt(['email'=> $username, 'password'=>$password]);
Give that a shot, and if that doesn't correct your issue I'll re-open this.
Thanks :)
Yes, that was it. Thanks.
Great, no problem.
Laravel Version: v5.5.19 Adldap2-Laravel Version: v3.0.5 PHP Version: 7.0
Description:
After creating a test route, the error I'm receiving is as follows:
Steps To Reproduce:
I've created a route in Routes/web.php as follows:
When I don't have the Auth::attempt in there, the Adldap::auth() seems to work as it shows "Worked" when loading the page. However, the Auth::attempt() generates the above error.
My user migration looks like this:
As you can see, there is no username column but as I understand it, there shouldn't be.
My adldap.php file looks like this:
My adldap_auth.php file looks like this: