diff --git a/auth.php b/auth.php index f69c6c3..ed7db2e 100755 --- a/auth.php +++ b/auth.php @@ -39,7 +39,7 @@ if ($force_login) { $user = new uUser(); $user->getFromSession(); -if (!$user->isValid && (uConfig::$require_authentication || defined('headless'))) { +if (!$user->isValid && (uConfig::$require_authentication || defined('client'))) { /* authentication */ $login = (isset($_REQUEST['user']) ? $_REQUEST['user'] : NULL); $pass = (isset($_REQUEST['pass']) ? $_REQUEST['pass'] : NULL); diff --git a/client/index.php b/client/index.php index 342a7ce..dba02d4 100644 --- a/client/index.php +++ b/client/index.php @@ -29,6 +29,7 @@ function setError(&$response, $message) { } define("headless", true); +define("client", true); require_once(dirname(__DIR__) . "/auth.php"); // sets $user $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;