Skip to content

Commit

Permalink
Merge pull request #481 from Vatsim-Scandinavia/version/v3.3.1
Browse files Browse the repository at this point in the history
Fixed bug from last commit
  • Loading branch information
blt950 authored Jan 15, 2023
2 parents 7cdb8cd + 849b96c commit 8db55b5
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 8db55b5

Please sign in to comment.