diff options
-rw-r--r-- | app/index.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/index.php b/app/index.php index 710dc8d..7f39cca 100644 --- a/app/index.php +++ b/app/index.php @@ -14,6 +14,7 @@ require_once "class/database.class.php"; require_once "class/settings.class.php"; +require_once "class/user.class.php"; /* * This file is the entry-point to the Scrott application. main() will @@ -34,8 +35,15 @@ function main(array $argv) : void if (settings::sslOnly()) require_https(); + /* assert that a user is logged in */ + if (!user::getCurrent()) + { + require "view/login.php"; + return; + } + /* TODO */ - echo "database is config!"; + echo "logged in"; } catch (Exception $e) |