This repository was archived by the owner on Jul 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -110,15 +110,28 @@ php artisan adldap:import --no-interaction
110110
111111Users will be imported automatically with no prompts.
112112
113- If you are calling the import command from another command, or the Laravel
114- scheduler, make sure you supply a ` true ` value to the flag, if
115- you are using multiple flags / parameters:
113+ You can also call the command from the Laravel Scheduler, or other commands:
116114
117115``` php
118- $schedule->command('adldap:import', [
119- '--filter' => '(cn=johndoe)',
120- '--no-interaction' => true,
121- ])->hourly();
116+ // Importing one user
117+ $schedule->command('adldap:import sbauman', ['--no-interaction'])
118+ ->everyMinute();
119+ ```
120+
121+ ``` php
122+ // Importing all users
123+ $schedule->command('adldap:import', ['--no-interaction'])
124+ ->everyMinute();
125+ ```
126+
127+ ``` php
128+ // Importing users with a filter
129+ $dn = 'CN=Accounting,OU=SecurityGroups,DC=Acme,DC=Org';
130+
131+ $filter = sprintf('(memberof:1.2.840.113556.1.4.1941:=%s)', $dn);
132+
133+ $schedule->command('adldap:import', ['--no-interaction', '--filter' => $filter])
134+ ->everyMinute();
122135```
123136
124137## Tips
You can’t perform that action at this time.
0 commit comments