Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

from user id to user role wordpress

$user_meta = get_userdata( $user_id );

$user_roles = $user_meta->roles; // array with all the roles the user is part of.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #user #id #user #role #wordpress
ADD COMMENT
Topic
Name
9+5 =