@hoseke
Active 8 years, 7 months ago
-
Henry Wright replied to the topic User Role in the forum Creating & Extending 9 years, 8 months ago
Hi @hoseke
Assuming you’re talking about WordPress roles and not BuddyPress member types, then you can do this:
$user = wp_get_current_user();
$user->set_role( 'student' );