WordPress.org

Ready to get started?Download WordPress

Forums

Finding Current User (2 posts)

  1. neosar
    Member
    Posted 10 years ago #

    I've put a login box right into index.php, but what I'd like it to do is check to see if someone is already logged in and if so simply say "welcome, username" and maybe have a couple links to sections of the admin area. Thing is that I can't figure out what variables to access to find out if the user is logged in and if so what their username is. I imagine it's a session variable or a cookie, but I can't find it documented what exactly to look for.

  2. wellard1981
    Member
    Posted 9 years ago #

    I've just put together some code for this, so here it is!
    http://www.wellardsworld.com/code/wp-user.phps
    Enjoy!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.