Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › Remove Select Option Change Member Type in User List to one role
- This topic has 11 replies, 2 voices, and was last updated 3 years, 10 months ago by Vladimir.
-
AuthorPosts
-
18/09/2020 at 11:03 #7033yomyaffeParticipant
Hi Vladimir,
in user list, i need block or remove the top select, to change the MemberType of the Users. I already change the roles of this role, and only can change the profile and role to some nonBlocked roles. But forum roles and memberType select`s still showing all the options… How can i limit this select’s to the options i need, o how can i remove it for some roles.
Thanks U
18/09/2020 at 13:06 #7034VladimirKeymasterHi,
Do you use bbPress to manage forum?
Is your membership plugin available at the wordpress.org/plugins? Send direct link to it.21/09/2020 at 08:04 #7039yomyaffeParticipantDid You recive the screanshots?
21/09/2020 at 11:48 #7040VladimirKeymasterNo. Where did you sent them?
06/10/2020 at 17:33 #7070yomyaffeParticipantI post heare the url of the images, but i can’t see the post… and do it three times..
07/10/2020 at 07:12 #7054yomyaffeParticipantI post it! But i dont know what happened with this post 🙁
https://aguahara.org/pantallazos/1.jpg
https://aguahara.org/pantallazos/2.jpg
https://aguahara.org/pantallazos/3.jpgIs an user list. You can see “Cambiar perfil” its change profile… it works
Foro i want limit the forum roles
but “Cambiar tipo de miembro” change member type… i have all the member types… i need void this select for this role, or show only the member types asociated to the grant roles.07/10/2020 at 07:20 #7074VladimirKeymasterThanks for letting me know. Your post was automatically got status ‘Pending’ due to 3 links inside and I missed it. I published it now.
I need access to the membership plugin to look how to hide its “Select member type” drop-down menu. Is your membership plugin available at the wordpress.org/plugins? Send to support[at-sign]role-edito.com a direct link to it (at wordpress.org or to your own copy via DropBox or similar sevice).
08/10/2020 at 13:54 #7081VladimirKeymasterFortunately ‘buddypress-member-types-pro’ plugin does not show it’s ‘Select member type’ drop-down list in case member types list is empty. So we can use this to hide it:
add_filter( 'bp_get_member_types', 'remove_bpmtp_select_member_type', 100 ); function remove_bpmtp_select_member_type( $types ) { $user = wp_get_current_user(); if ( is_array($user->roles ) && in_array('users_administrator', $user->roles ) ) { $types = array(); } return $types; }
Just replace ‘users_administrator’ at the code above with your own role ID and place this code to your active theme functions.php file or set it as a Must Use plugin.
29/10/2020 at 17:55 #7139yomyaffeParticipantThanks U Vladimir,
this code work’s fine, but only with one role, how can i do it for different roles?
29/10/2020 at 19:49 #7140yomyaffeParticipantI already fix it!! thanks u
12/11/2020 at 17:14 #7155yomyaffeParticipantOk, it works. But The Users with the role of the remove function, now dont see the select for membertypes… but, the actions who they perform over one user, dont works fine…
They can change the profile, but usually, when they change the profile, inside this action change the site profile, and assign some memberTypes and roles to the profile changed. But now change only the Site profile and roles, but not the membertypes.
🙁
13/11/2020 at 10:09 #7158VladimirKeymasterClarify, do you need that user still can change member type editing user profile?
-
AuthorPosts
- You must be logged in to reply to this topic.