diff --git a/app/Console/Commands/KillAllSessions.php b/app/Console/Commands/KillAllSessions.php new file mode 100644 index 000000000000..043be0fa1875 --- /dev/null +++ b/app/Console/Commands/KillAllSessions.php @@ -0,0 +1,59 @@ +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/*")); + + $count = 0; + foreach ($session_files as $file) { + + if (is_file($file)) + unlink($file); + $count++; + } + \DB::table('users')->update(['remember_token' => null]); + + $this->info($count. ' sessions cleared!'); + + } +} diff --git a/app/Console/Commands/RestoreFromBackup.php b/app/Console/Commands/RestoreFromBackup.php index 06c99ec08cf4..0cc4a9a26b48 100644 --- a/app/Console/Commands/RestoreFromBackup.php +++ b/app/Console/Commands/RestoreFromBackup.php @@ -14,7 +14,7 @@ class RestoreFromBackup extends Command * @var string */ protected $signature = 'snipeit:restore - {--force : Skip the danger prompt; assuming you hit "y"} + {--force : Skip the danger prompt; assuming you enter "y"} {filename : The zip file to be migrated} {--no-progress : Don\'t show a progress bar}';