php - I Want to Assign Multiple Roles to a single user -


i've found below 2 lines inserted somewhere in our theme job done:

$addmembertogroup = new wp_user($required_id); $addmembertogroup->add_role( $role ); 

but dont know place these lines. know put those?

on action want assign user role, custom code need put in theme's function.php file (if child theme put in child theme's function.php file) depends on requirement.


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -