mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Removed > 300
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
e833052e8e
commit
2518e2f0ee
|
@ -1284,24 +1284,22 @@ class SettingsController extends Controller
|
|||
$migrate_output = Artisan::output();
|
||||
\Log::debug($migrate_output);
|
||||
|
||||
if (strlen($output) > 300) {
|
||||
$find_user = DB::table('users')->where('first_name', $user->first_name)->where('last_name', $user->last_name)->exists();
|
||||
|
||||
if (!$find_user){
|
||||
\Log::warning('Attempting to restore user: ' . $user->first_name . ' ' . $user->last_name);
|
||||
$new_user = $user->replicate();
|
||||
$new_user->push();
|
||||
}
|
||||
|
||||
\Log::debug('Logging all users out..');
|
||||
Artisan::call('snipeit:global-logout', ['--force' => true]);
|
||||
|
||||
DB::table('users')->update(['remember_token' => null]);
|
||||
\Auth::logout();
|
||||
|
||||
return redirect()->route('login')->with('success', 'Your system has been restored. Please login again.');
|
||||
$find_user = DB::table('users')->where('username', $user->username)->exists();
|
||||
if (!$find_user){
|
||||
\Log::warning('Attempting to restore user: ' . $user->username);
|
||||
$new_user = $user->replicate();
|
||||
$new_user->push();
|
||||
} else {
|
||||
return redirect()->route('settings.backups.index')->with('error', $output);
|
||||
\Log::debug('User: ' . $user->username .' already exists.');
|
||||
}
|
||||
|
||||
\Log::debug('Logging all users out..');
|
||||
Artisan::call('snipeit:global-logout', ['--force' => true]);
|
||||
|
||||
DB::table('users')->update(['remember_token' => null]);
|
||||
\Auth::logout();
|
||||
|
||||
return redirect()->route('login')->with('success', 'Your system has been restored. Please login again.');
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue