$loggers['audit']->notice("Failed login attempt (username: {$_POST['username']})"); header('location:index.php?status=fail'); exit; } foreach ($user as $key => $value) { $SESSION->{$key} = $value; } $SESSION->logged_in = md5(uniqid(microtime()) . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']); $SESSION->user_id = $user['student_num']; if ($SESSION->corr_lang == "E") { $SESSION->corr_lang = "en-CA"; } elseif ($SESSION->corr_lang == "F") { $SESSION->corr_lang = "fr-CA"; } //Check if the student have ventus accommodations $current_active_accommodations = $model->fetchAllStudentActiveAccommodations($SESSION->student_num); if (!empty($current_active_accommodations)) { //If the student hasn't responded to the checkbox AND their letters havent been automatically generated if ($SESSION->access_email_permission == "0" && empty($SESSION->access_cam_letter_sent_on)) { $loggers['audit']->info("Student logged in, CAM not authorized yet"); header('location:index.php?page=cam-notice'); exit; } // Student has responded to CAM // First login? if ($_GET['mode'] === "first-time") { // First login $loggers['audit']->info("Student logged in for the first time"); header('location:profile.php?mode=first-time'); exit; }