Closed jfoucher closed 7 months ago
I tried with both an OpenLDAP server running in docker, and the forumsys.com one.
As an FYI, I fixed it by changing the configured model in my auth.php config file
I had this
'providers' => [
'users' => [
...
],
'ldap' => [
'driver' => 'ldap',
'model' => LdapRecord\Models\ActiveDirectory\User::class,
'rules' => [],
'database' => [
'model' => App\Models\User::class,
'sync_passwords' => true,
'sync_attributes' => \App\Ldap\AttributeHandler::class,
'sync_existing' => [
'email' => 'mail',
],
],
],
],
I replaced the 'model' line with
'model' => LdapRecord\Models\OpenLDAP\User::class,
and now the import works fine.
Environment:
Describe the bug:
When I launch the command
php artisan ldap:import
All I get in return isThere were no users found to import.
When I know for a fact that the LDAP server contain users (I used Apache Directory Studio to make sure.)When I use
php artisan ldap:browse
, I can see the users just fine, andphp artisan ldap:test
gives me a successful connectionWhat could be going wrong? Thanks