@@ -38,7 +38,7 @@ Confirming the display of users to will show a table of users that will be impor
3838+------------------------------+----------------------+----------------------------------------------+
3939```
4040
41- After it has displayed all user , you will then be asked:
41+ After it has displayed all users , you will then be asked:
4242
4343
4444``` bash
@@ -82,14 +82,6 @@ By default, this is enabled.
8282php artisan adldap:import --no-log
8383```
8484
85- ### Connection
86-
87- The ` --connection ` (or ` -c ` ) option allows you import users with a different connection specified in your ` config/adldap.php ` file.
88-
89- ``` bash
90- php artisan adldap:import --connection other-connection
91- ```
92-
9385### Delete
9486
9587The ` --delete ` (or ` -d ` ) option allows you to soft-delete deactivated AD users. No users will
@@ -109,6 +101,27 @@ php artisan adldap:import --restore
109101
110102> ** Note** : Usually the ` --restore ` and ` --delete ` options are used in tandem to allow full synchronization.
111103
104+ ### No Interaction
105+
106+ To run the import command via a schedule, use the ` --no-interaction ` flag:
107+
108+ ``` php
109+ php artisan adldap:import --no-interaction
110+ ```
111+
112+ Users will be imported automatically with no prompts.
113+
114+ If you are calling the import command from another command, or the Laravel
115+ scheduler, make sure you supply a ` true ` value to the flag, if
116+ you are using multiple flags / parameters:
117+
118+ ``` php
119+ $schedule->command('adldap:import', [
120+ '--filter' => '(cn=johndoe)',
121+ '--no-interaction' => true,
122+ ])->hourly();
123+ ```
124+
112125## Tips
113126
114127 - Users who already exist inside your database will be updated with your configured ` sync_attributes `
0 commit comments