diff options
-rw-r--r-- | app/controller/root.control.php | 10 | ||||
-rw-r--r-- | app/model/auth.mod.php | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/app/controller/root.control.php b/app/controller/root.control.php index b44ad76..06abf27 100644 --- a/app/controller/root.control.php +++ b/app/controller/root.control.php @@ -29,11 +29,19 @@ class Root extends Controller /* TODO */ /* TODO -- only auth if logged out */ - else + else if (!$this->getCurrentUser()) { $ctrl = new Auth(); $ctrl->handle($argv); } + + else + { + echo "logged in as:!"; + echo "<pre>"; + var_dump($this->getCurrentUser()); + echo "</pre>"; + } } /* diff --git a/app/model/auth.mod.php b/app/model/auth.mod.php index cdf416b..9fa67e4 100644 --- a/app/model/auth.mod.php +++ b/app/model/auth.mod.php @@ -63,6 +63,7 @@ class AuthModel extends CommonModel return; } + $this->setCurrentUser($user); $this->redirectTo($this->ap() . "/"); } } |