is_signed_in()){ redirect("index.php"); } //die(print_r($_SERVER)); //$_SESSION['referer'] = $_SERVER['HTTP_REFERER']; if(isset($_POST['submit'])){ $username = trim($_POST['username']); $password = trim($_POST['password']); $remember_me = isset($_POST['remember']); $timezone = $_POST['timezone']; /* if(isset($_POST['clinic_id'])){ $clinic_id = $_POST['clinic_id']; }else{ $clinic_id = ""; }*/ //get the salt $salt = User::extract_salt($username); $password = hash_password($password, $salt->randSalt); //check username $user_found = User::verify_user($username, $password); if($user_found){ if($user_found->status == "Active" || $user_found->status == "active"){ //die("user found"); //die($user_found->id." ".$user_found->usergroup_id); //$session->login($user_found,$remember_me,$clinic_id); if ($user_found->deleted_on != "0000-00-00 00:00:00") { $msg = '