diff options
Diffstat (limited to 'app/model/auth.mod.php')
-rw-r--r-- | app/model/auth.mod.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/model/auth.mod.php b/app/model/auth.mod.php index 9c356e2..9cd6b7c 100644 --- a/app/model/auth.mod.php +++ b/app/model/auth.mod.php @@ -1,6 +1,7 @@ <?php require_once "model/common.mod.php"; +require_once "class/user.class.php"; class AuthModel extends CommonModel { @@ -9,6 +10,15 @@ class AuthModel extends CommonModel */ function deflt() { + /* Make sure user accounts exist since this is preping the page to login. If there are no accounts in the DB, + * return false to signal controller to display the admin account creation */ + + $userTbl = new User(); + + if (count($userTbl->getAllUsers_orderByName()) == 0) + return false; + + return true; } } |