$program = $t->program($rating); $studentUpdate = $t->updateStudent(array('program' => $program), [['cid', '=', $user->user->id]]); Session::flash('success', 'You are now logged in!'); Redirect::to('../index.php'); } elseif (!$siteLogin && $user->user->division->code == "EUD" && $user->user->subdivision->code == "IRL") { //Possible future feature - create an account apart from CRON here. try { //Try making an account if they are a member of VATeir... if ($user->user->rating->id > 7) { $rating = $u->getRealRating($user->user->id); } else { $rating = $user->user->rating->id; } $pilotRating = $t->pilotRating($user->user->pilot_rating->rating); $make = $u->create(array('id' => $user->user->id, 'alive' => 1, 'first_name' => $user->user->name_first, 'last_name' => $user->user->name_last, 'email' => $user->user->email, 'rating' => $rating, 'pilot_rating' => $user->user->pilot_rating->rating, 'pratingstring' => $pilotRating, 'regdate_vatsim' => date("Y-m-d H:i:s", strtotime($user->user->reg_date)), 'regdate_vateir' => date('Y-m-d H:i:s'), 'grou' => 10)); if (!$t->getStudent($user->user->id)) { $program = $t->program($rating); $studentMake = $t->createStudent(array('cid' => $user->user->id, 'program' => $program)); } $u->login($user->user->id); Session::flash('success', 'You are now logged in!'); Redirect::to('../index.php'); } catch (Exception $x) { echo $x->getMessage(); } } else { $notAllowed = $user->user->rating->id > 2 ? false : true; //Set the rating to be S2 and above for visiting controller applications echo "<h4>Hey " . $user->user->name_first . ",</h4>"; ?> <div style="font-size:16px">