Getting User Level
-
I am writing a plugin that displays content only to admin user. To test if admin is logged in I trued using $user_level but the value I get is 0 instead of 10.
This code:
get_currentuserinfo() ;
global $user_level;
echo ‘user level: ‘.$user_level;Will echo out 0 when admin is logged in.
What am I doing wrong?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Getting User Level’ is closed to new replies.