Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit b292b4a

Browse files
committed
Automatically import users on no-interaction
1 parent e588a2b commit b292b4a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Commands/Import.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,16 @@ public function handle()
4848
$this->info("Found {$count} user(s).");
4949
}
5050

51-
$interactive = $this->input->isInteractive();
52-
53-
if (!$interactive || $this->confirm('Would you like to display the user(s) to be imported / synchronized?')) {
51+
if ($this->confirm('Would you like to display the user(s) to be imported / synchronized?')) {
5452
$this->display($users);
5553
}
5654

57-
if (!$interactive || $this->confirm('Would you like these users to be imported / synchronized?')) {
55+
if ($this->confirm('Would you like these users to be imported / synchronized?', $default = true)) {
5856
$imported = $this->import($users);
5957

60-
$this->info("\nSuccessfully imported / synchronized {$imported} user(s).");
58+
$this->info("Successfully imported / synchronized {$imported} user(s).");
6159
} else {
62-
$this->info('Okay, no users were imported / synchronized.');
60+
$this->info("Okay, no users were imported / synchronized.");
6361
}
6462
}
6563

0 commit comments

Comments
 (0)