From 17c0ca97ae48c8714f0e93ff326ab7ed1deaaf73 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Tue, 22 Oct 2019 22:40:34 -0500 Subject: [PATCH] purge useres --- app/Console/Commands/Users/PurgeUsers.php | 26 ++++++----------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/app/Console/Commands/Users/PurgeUsers.php b/app/Console/Commands/Users/PurgeUsers.php index c8178e821..16dcdfdc9 100644 --- a/app/Console/Commands/Users/PurgeUsers.php +++ b/app/Console/Commands/Users/PurgeUsers.php @@ -89,30 +89,16 @@ class PurgeUsers extends Command //Check if the user is allowed to login if(isset($corp_info->alliance_id)) { - //Warped Intentions is allowed to login - if($corp_info->alliance_id == '99004116') { + //Warped Intentions is allowed to login as users + //Legacy is allowed to login as users + //Renters are allowed to login as users + if($corp_info->alliance_id == '99004116' || in_array($corp_info->alliance_id, $legacy) || in_array($corp_info->alliance_id, $renter)) { //If the role is not Warped Intentions, then modify the role - if($role != 'W4RP') { + if($role != 'User') { UserRole::where([ 'character_id' => $user->character_id, ])->update([ - 'role' => 'W4RP', - ]); - } - } else if(in_array($corp_info->alliance_id, $legacy)) { //Legacy Users - if($role != 'Legacy') { - UserRole::where([ - 'character_id' => $user->character_id, - ])->update([ - 'role' => 'Legacy', - ]); - } - } else if(in_array($corp_info->alliance_id, $renter)) { //Renter Users - if($role != 'Renter') { - UserRole::where([ - 'character_id' => $user->character_id, - ])->update([ - 'role' => 'Renter', + 'role' => 'User', ]); } } else {