Skip to content

Commit

Permalink
Fixed bug from last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Jan 15, 2023
1 parent fefbcf3 commit 849b96c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Console/Commands/CheckOnlineControllers.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public function handle()
foreach($vatsimData as $d){
if(preg_match($areasRegex, $d->callsign)){
// Lets check this user
$this->info("Checking user ".$d->cid);
$user = User::find($d->cid);
$this->info("Checking user ".$d['cid']);
$user = User::find($d['cid']);
if(isset($user) && !$user->isVisiting()){
if(!$user->active && !$user->hasActiveTrainings(false) && !$user->hasRecentlyCompletedTraining()){
if(!isset($user->last_inactivity_warning) || (isset($user->last_inactivity_warning) && Carbon::now()->gt(Carbon::parse($user->last_inactivity_warning)->addHours(6)))){
Expand All @@ -78,7 +78,7 @@ public function handle()
$user->save();

// Send warning to all admins, and moderators in selected area
$position = Position::where('callsign', $d->callsign)->get()->first();
$position = Position::where('callsign', $d['callsign'])->get()->first();
$sendToStaff = User::allWithGroup(1);

if($position){
Expand Down

0 comments on commit 849b96c

Please sign in to comment.