Anonymous user access rank wiring
This commit is contained in:
parent
c905f1d7dd
commit
377bdcf7c9
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<?php if (empty($this->context->user)): ?>
|
||||
<?php if (!$this->context->loggedIn): ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'login') ?>">Login</a>
|
||||
or
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'register') ?>">register</a>
|
||||
|
|
Loading…
Reference in a new issue