Changing user role in Profile Edit
-
I am using a clever script to allow users to select a user role on registration:
add_action('user_register', 'register_role'); function register_role($user_id, $password="", $meta=array()) { $userdata = array(); $userdata = $user_id; $userdata = $_POST; //only allow if user role is my_role if ($userdata == "my_role"){ wp_update_user($userdata); } }
I am trying to adapt it to use on the BuddyPress Profile Edit form but cannot get it to work. I guess it needs the right add_action(). Any ideas what that would be?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Changing user role in Profile Edit’ is closed to new replies.