1
votes

Hi i am using wordpress and working on a buddypress to make a social website. Two types of users can be registered in that site A and B. The Problem is i want users to define its role on registration?? Secondly i want user A to edit its buddypress profile user A can also post events upload images/videos/music etc, while User B can only edit its profile and can not do anything. I have tried a lot of plugins but could not find the desired result. Is there any plugin which can do this or i have to edit the core files and if i had to edit the core file then which files do i need to edit ???

2

2 Answers

0
votes

You can allow user to select their role on registration by means of any radio buttons or drop-down boxes, and see THIS LINK to enable it.

and You can check the user's role and prevent/allow the action and always use functions.php to code these.

To Check user role:

function get_user_role( $user_id ){

  $user_data = get_userdata( $user_id );

  if(!empty( $user_data->roles ))
      return $user_data->roles[0];

  return false; 
}
0
votes

You can use WP Roles at Registration plugin.

For 2nd one, You can manage/add/delete/ user role capabilities with this plugin, User Role Editor

I found these 2 from a hard search and was very useful to me for something similar.

Hope these will help you! :)