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

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -