Closed warlord0 closed 8 years ago
Hi @warlord0, this is strange.
It seems like your pre-existing model isn't being located during authentication, so a new model is created.
Can you try editing the source file here:
https://github.com/Adldap2/Adldap2-Laravel/blob/master/src/Traits/ImportsUsers.php#L41-L42
And right after the highlighted lines, add dd($model);
and post the result?
Hmm, well that simply returned null
so I added a couple more:
dd($key, $username, $model);
and got back:
"username"
null
null
Been playing some more. No idea what I did wrong, but moved onto a Laravel 5.3 project did the same things required and it worked. :o
As I'm using
spatie/laravel-permission
I can't remove the columnemail
so I've simply followed thequick-smart.md
with the exception of adding a new columnusername
rather than removing/renaming the email column. Using the following migration:Now I manage to authenticate and it logs me in, as if the user doesn't exist it gets created and I can continue. But the next time I logon it fails at updating the table. with:
adldap_auth.php