Hey,
how can I determine whether a member is logged in? I want to do it within a template, not a module. Something like
Code:<?php if($user->loggedIn): ?>
Hello user!
<?php else: ?>
Hello guest!
<?php endif; ?>
Printable View
Hey,
how can I determine whether a member is logged in? I want to do it within a template, not a module. Something like
Code:<?php if($user->loggedIn): ?>
Hello user!
<?php else: ?>
Hello guest!
<?php endif; ?>
Can be used to check whether any front end user is logged in. To check for a particular user, tryCode:<?php if (FE_USER_LOGGED_IN): ?>
The first import() statement might be redundant.Code:<?php $this->import('FrontendUser', 'User'); if ($this->User->id == 4): ?>
Thanks Leo! :D