@crehiren
Active 9 years, 8 months ago
-
Henry Wright replied to the topic Is it possible in buddypress that user can register with two role ? in the forum Installing BuddyPress 9 years, 10 months ago
Hi @crehiren
You can do that quite easily. For example, if you wanted to add a new role to the currently logged-in user then you could do this:
// Get a WP_User object for the current user.
$user = wp_get_current_user();// Use the add_role() method to add the editor role to this user.
$user->add_role( 'editor' );