Users not recognized in theme
-
I have a page in my theme that uses the following code:
global $current_user; get_currentuserinfo(); echo 'Username: ' . $current_user->user_login . "\n"; echo 'User ID: ' . $current_user->ID . "\n";
Even though I’m logged in as an administrator, the code returns null values for $current_user->user_login and $current_user->ID = 0. I’ve tried disabling all plugins and re-installing WP 3.3.1, but can’t seem to get the user info to show up. This was working when I first installed 3.3.1, and I don’t know of any changes that have happened since then.
Any help would be much appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Users not recognized in theme’ is closed to new replies.