diff --git a/src/Bootstrap.php b/src/Bootstrap.php index e1a4310d..7840fbce 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -14,8 +14,10 @@ class Bootstrap } if (empty($this->context->user)) { - #todo: construct anonymous user - $this->context->user = null; + $dummy = R::dispense('user'); + $dummy->name = 'Anonymous'; + $dummy->access_rank = AccessRank::Anonymous; + $this->context->user = $dummy; } } diff --git a/src/Views/layout-normal.phtml b/src/Views/layout-normal.phtml index 8bbc99ba..6db664c7 100644 --- a/src/Views/layout-normal.phtml +++ b/src/Views/layout-normal.phtml @@ -21,7 +21,7 @@
  • - context->user)): ?> + context->loggedIn): ?> Login  or  register