Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

if ($context['user']['is_logged']) - not working

Aloittaja liability, toukokuu 24, 2011, 12:08:32 AP

« edellinen - seuraava »

liability

Hi everyone,

Does the following code require anything else to work? Nothing displays, whether someone is logged in or not.

SMF 1.1.3
index.template.php
It's in the template_main_above() function with the global $context, $settings, $options, $scripturl, $txt, $modSettings included.



       // Are they logged in?
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br /><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - this time ask them to either register or login
else
{
echo ' ', $txt['welcome_guest'], '</div> ';
}


Pretty sure I'm missing something, just not sure what. Any guidance would be appreciated!

Sir Osis of Liver

Careful, they'll spank you for double posting this topic. 

Replied to your other thread.

When in Emor, do as the Snamors.
                              - D. Lister

liability

ah man, I thought it was in the wrong place so I tried to delete it :(

Appreciate the response - will check it out now.

Aleksi "Lex" Kilpinen

Both boards are fine for stuff like this, but let's continue the discussion over there then ;)
http://www.simplemachines.org/community/index.php?topic=435182
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: