Added logout to the header
Displaying options based on if the user is authenticated or not.
This commit is contained in:
parent
34c41764b5
commit
3e769286d2
2 changed files with 10 additions and 3 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
class login extends AnonymousModule
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -48,10 +48,18 @@
|
|||
'/' => 'Home',
|
||||
'/about' => 'About',
|
||||
'/contact' => 'Contact',
|
||||
'/login' => 'Sign in',
|
||||
'/join' => 'Sign up',
|
||||
);
|
||||
|
||||
if (User::isAuthenticated())
|
||||
{
|
||||
$links['/logout'] = 'Logout';
|
||||
}
|
||||
else
|
||||
{
|
||||
$links['/login'] = 'Sign in';
|
||||
$links['/join'] = 'Sign up';
|
||||
}
|
||||
|
||||
foreach ($links as $uri => $label)
|
||||
{
|
||||
$active = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue