diff options
author | Malf Furious <m@lfurio.us> | 2018-02-07 21:15:03 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-02-07 21:15:03 -0500 |
commit | 66aa954421c093ad54da8806e42d4ff9bba59091 (patch) | |
tree | 26803b0e992fc85d04a4f0a654248a2caad6238f /app/index.php | |
parent | 77fd5b7ef80a32fe98efa04b13f210989f2a43b5 (diff) | |
download | scrott-66aa954421c093ad54da8806e42d4ff9bba59091.tar.gz scrott-66aa954421c093ad54da8806e42d4ff9bba59091.zip |
Add login view to controller
Diffstat (limited to 'app/index.php')
-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) |