Closed shawnbyday closed 6 years ago
Hi @shawnbyday,
You need to modify your sync_attributes
configuration if you're using a username
instead of email
for authentication:
'sync_attributes' => [
'email' => 'mail', // Remove
'username' => 'samaccountname', // Add
'name' => 'cn',
],
Please read the quick-start as it walks you through this process if you're using a username:
https://github.com/Adldap2/Adldap2-Laravel/blob/master/docs/quick-start.md
If you still encounter issues, comment back and I'll re-open this.
Description:
Currently trying to get my configuration correct for ActiveDirectory. I've followed the "from scratch" section in my current project and I'm currently on the error:
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'email' in 'field list' (SQL: insert into
users
(email
,name
,username
,password
,updated_at
,created_at
) values (removed@removed.removed, Shawn Miller, , removed, 2018-07-23 16:42:57, 2018-07-23 16:42:57))I also receive this same error when running: php artisan adldap:import user.name
For some reason even though it is using my sAMAccountName to find and authenticate me as indicated here:
it is trying to insert a blank username into the database. It feels like Laravel is still trying to insert into the database the way it wants so I'm not sure if this is a Laravel issue I'm trying to solve or a Adldap2 issue or an AD issue or a me issue. It feels like Laravel is still trying to use e-mail as the username and more or less ignoring my username configs. Maybe I'm just missing something important?
adldap.php
adldap_auth.php
Steps To Reproduce: