redirectTo("https://" . $_SERVER['SERVER_NAME'] . $this->ap()); } /* * Security check * Assert that the current connection to this server is NOT secure. Redirects if not. */ function sec_forbid_https() { if (isset($_SERVER['HTTPS'])) $this->redirectTo("http://" . $_SERVER['SERVER_NAME'] . $this->ap()); } /* * Security check * Assert that the client's IP address does not change during its session. If a change is detected, logout. */ function sec_verify_ip() { $addr = $_SERVER['REMOTE_ADDR']; if ($this->getCurrentUser() && $addr != $this->getOriginIP()) { $this->setCurrentUser(); $this->redirectTo($this->ar() . "/"); } } } ?>