Provider [ldap] does not exist. #324
-
Hello again I'm having trouble executing I don't know if I can post this here as well but I how can I execute some code after the user is first being imported/syncronized from the login? In my situation I'm using spatie Laravel-Permission and I want to give some permissions/roles to that user after the first login or when it gets imported. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @luis-gmonkey, When calling // config/auth.php
'users' => [
'driver' => 'ldap',
'model' => \LdapRecord\Models\ActiveDirectory\User::class,
'database' => [
// ...
],
], Then to run the import on this authentication provider, I would execute the below command: php artisan ldap:import users Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
@stevebauman : I run into the same problem. Since your example auth.php, in Running the command uses provider php artisan ldap:import users This seems inconsistent som may be you should change the documentation to: php artisan ldap:import ldap Agree? |
Beta Was this translation helpful? Give feedback.
Hi @luis-gmonkey,
When calling
php artisan ldap:import
, you must supply the authentication provider's key if it is not namedldap
. For example, in the belowconfig/auth.php
file, I have a provider namedusers
:Then to run the import on this authentication provider, I would execute the below command:
Hope this helps!