[wp-hackers] get_user_meta returning empty string

Otto otto at ottodestruct.com
Wed Nov 24 21:53:41 UTC 2010


On Wed, Nov 24, 2010 at 2:44 PM, Muro, Matthew <mmuro at advance.ua.edu> wrote:
> To be honest, all I'm really interested in is the named role of the current user, which get_user_meta or get_userdata return.

$user = wp_get_current_user();
var_dump ($user->roles);

-Otto


More information about the wp-hackers mailing list