5
5
use Adldap \Models \User ;
6
6
use Adldap \Laravel \Traits \ImportsUsers ;
7
7
use Illuminate \Console \Command ;
8
+ use Symfony \Component \Console \Input \InputArgument ;
9
+ use Symfony \Component \Console \Input \InputOption ;
8
10
9
11
class Import extends Command
10
12
{
@@ -15,17 +17,14 @@ class Import extends Command
15
17
*
16
18
* @var string
17
19
*/
18
- protected $ signature = 'adldap:import
19
- {user?}
20
- {--filter= : A raw filter for limiting users imported.}
21
- {--log=true : Log successful and unsuccessful imported users.} ' ;
20
+ protected $ name = 'adldap:import ' ;
22
21
23
22
/**
24
23
* The console command description.
25
24
*
26
25
* @var string
27
26
*/
28
- protected $ description = 'Imports users into the local database with a random 16 character hashed password. ' ;
27
+ protected $ description = 'Imports LDAP users into the local database with a random 16 character hashed password. ' ;
29
28
30
29
/**
31
30
* Execute the console command.
@@ -115,6 +114,32 @@ public function isLogging()
115
114
return $ this ->option ('log ' ) == 'true ' ;
116
115
}
117
116
117
+ /**
118
+ * Get the console command arguments.
119
+ *
120
+ * @return array
121
+ */
122
+ public function getArguments ()
123
+ {
124
+ return [
125
+ ['user ' , InputArgument::OPTIONAL , 'The specific user to import using ANR. ' ],
126
+ ];
127
+ }
128
+
129
+ /**
130
+ * Get the console command options.
131
+ *
132
+ * @return array
133
+ */
134
+ public function getOptions ()
135
+ {
136
+ return [
137
+ ['filter ' , null , InputOption::VALUE_OPTIONAL , 'The raw filter for limiting users imported. ' ],
138
+
139
+ ['log ' , true , InputOption::VALUE_OPTIONAL , 'Log successful and unsuccessful imported users. ' ]
140
+ ];
141
+ }
142
+
118
143
/**
119
144
* {@inheritdoc}
120
145
*/
0 commit comments