WordPress.org

Support

Support » Requests and Feedback » Am I logged in?

Am I logged in?

  • It seems that there’s no real way to tell if you are logged in to the Blog site and who you are logged in as.
    Is there a plugin/hack available that will do something like this in the Other section?
    If user is not logged in, nothing needs to change. Login and register links both show up.
    If user is logged in, change this section to say something like Hello {username}! and have a logout link.

Viewing 6 replies - 1 through 6 (of 6 total)
  • If the user is logged in, they will see the inner workings of WordPress surely ?
    ..and there is a log out link on the right …

    Thats right. A minor useability detail but it might be nice. I’ d also like a Comment mod on / off on my front page but I havent got it fixed up yet.

    I put this in my index.php file, where I want the “hello USERNAME” to show up:

    get_currentuserinfo();
    if (isset($user_ID) && ('' != intval($user_ID)))
    {$hello='Welcome ';
    $hello.=$user_nickname;
    $hello.='<br>';
    echo $hello;}

    Thanks, it appears I don’t know enough about php to successfully add this to index.php however. When I copy and paste it, the site breaks.

    That’s because you have to replace the && for &&. So, try this:

    get_currentuserinfo();
    if (isset($user_ID) && ('' != intval($user_ID)))
    {$hello='Welcome ';
    $hello.=$user_nickname;
    $hello.='<br>';
    echo $hello;}

    if you look at your posts on your blog, you’ll notice an ‘edit this’ link in the post meta if you are logged in. doesn’t tell you WHO, but it does tell you IF.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Am I logged in?’ is closed to new replies.
Skip to toolbar