mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Add a force override
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
3e3c277a3f
commit
1ac293a12a
|
@ -11,7 +11,7 @@ class KillAllSessions extends Command
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'snipeit:global-logout';
|
||||
protected $signature = 'snipeit:global-logout {--force : Skip the danger prompt; assuming you enter "y"} ';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
|
@ -37,7 +37,10 @@ class KillAllSessions extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
if ($this->confirm("\n****************************************************\nTHIS WILL FORCE A LOGIN FOR ALL LOGGED IN USERS.\n\nAre you SURE you wish to continue? ")) {
|
||||
|
||||
if (!$this->option('force') && !$this->confirm("****************************************************\nTHIS WILL FORCE A LOGIN FOR ALL LOGGED IN USERS.\n\nAre you SURE you wish to continue? ")) {
|
||||
return $this->error("Session loss not confirmed");
|
||||
}
|
||||
|
||||
$session_files = glob(storage_path("framework/sessions/*"));
|
||||
|
||||
|
@ -51,7 +54,6 @@ class KillAllSessions extends Command
|
|||
\DB::table('users')->update(['remember_token' => null]);
|
||||
|
||||
$this->info($count. ' sessions cleared!');
|
||||
}
|
||||
//
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue