Support » Fixing WordPress » Shows not logged in, when logged in ;-(

  • Hi,

    im using an integration of wordpress, phpbb and 4images. The integrations follows a HACK of

    My problem is, that i just want to show some more links, when the user is logged in, and some different content if not.

    I have found the code to test it:

    global $user_ID, $user_identity, $userdata;
     if ( $user_ID ) : ?>
    User is logged in
    <?php else : ?>
    User is not logged in
    <?php endif; ?>

    Even, if iam logged in, it tells me that im not logged in. Everything else works fine. I put the following function right above the code:

    <?php wp_loginout(); ?>

    When i am logged in, the logout link and my username in brackets appears correctly, though the if ( $user_ID )tells me, i am not…uff


    I tried several other conditions like if ( intval($userdata->user_level) >= 1 OR if ('' == $user_ID), but it didnt work either.

    What would be the problem? Any ideas?

    Maybe i just have to use a different condition..because i think, since the wp_loginout() function works, it has nothing to do with the integration, i think.

    Many thanks in advance!

Viewing 1 replies (of 1 total)
  • I’m having the same problem.

    <?php if ( $user_ID ) : ?>
    		<?php printf(__('Hello, %s.'), $user_identity) ?>
        <?php else : ?>
        User is not logged in
        <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Shows not logged in, when logged in ;-(’ is closed to new replies.