I´m looking for a conditional logic for logged in users. Something like this
if (USER IS LOGGED IN) {
DO SOMETHING
}
else {
DO SOMETHING ELSE
}
Any ideas? Shouldn´t be difficult but I can´t find the conditional logic.
Depends where you're trying to do this as to what it will be. Where exactly is this going to be?
Figured it out by myself.
if ($context['user']['is_logged']) {
template_info_center();
}
So dead simple ;)
Except it isn't as 'dead simple' as you make it out to be. There are other circumstances where $context['user'] cannot be relied upon and won't even exist. Which is why I asked, but I'm glad you got a solution.
Thanks anyway.