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))
|
if (empty($this->context->user))
|
||||||
{
|
{
|
||||||
#todo: construct anonymous user
|
$dummy = R::dispense('user');
|
||||||
$this->context->user = null;
|
$dummy->name = 'Anonymous';
|
||||||
|
$dummy->access_rank = AccessRank::Anonymous;
|
||||||
|
$this->context->user = $dummy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php if (empty($this->context->user)): ?>
|
<?php if (!$this->context->loggedIn): ?>
|
||||||
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'login') ?>">Login</a>
|
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'login') ?>">Login</a>
|
||||||
or
|
or
|
||||||
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'register') ?>">register</a>
|
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'register') ?>">register</a>
|
||||||
|
|
Loading…
Reference in a new issue