purge users

This commit is contained in:
2019-10-22 22:24:46 -05:00
parent 79caad0d54
commit 4ef0f1ce91

View File

@@ -56,6 +56,13 @@ class PurgeUsers extends Command
//Setup the esi variable //Setup the esi variable
$esi = new Eseye(); $esi = new Eseye();
//Attempt to get the server status. Don't want to do anything if the server is down for some reason.
try {
$status = $esi->invoke('get', '/status/');
} catch(RequestFailedException $e) {
return;
}
//Get all of the users from the database //Get all of the users from the database
$users = User::all(); $users = User::all();
@@ -74,7 +81,7 @@ class PurgeUsers extends Command
'character_id' => $user->character_id, 'character_id' => $user->character_id,
]); ]);
$corp_info = $esi->invoke('get', '/corporations/{corporation_id/', [ $corp_info = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $character_info->corporation_id, 'corporation_id' => $character_info->corporation_id,
]); ]);
} catch(RequestFailedException $e) { } catch(RequestFailedException $e) {