/** * Check if site is open or closed. Exit if closed * * @param object $h */ public function checkAccess() { if (SITE_OPEN == 'true') { return true; } // site is open, go back and continue // site closed, but user has admin access so go back and continue as normal if ($this->currentUser->getPermission('can_access_admin') == 'yes') { return true; } if ($this->pageName == 'admin_login') { return true; } require_once LIBS . 'Maintenance.php'; $maintenance = new Maintenance(); return $maintenance->siteClosed($this, $this->lang); // displays "Site Closed for Maintenance" }