Replies
- y2gabs on December 5, 2018 at 4:42 pm in reply to: [Resolved] buddypress Deactivate Account Plugin #19263
Hi there, followup question on this. Can you recommend a way to bring the deactivate button in to the members loop as a clickable button on each member’s div in the loop?
Thanks!
- y2gabs on December 5, 2018 at 4:41 pm in reply to: [Resolved] buddypress member type pro slug url #19262
Okay thanks… turns out it’s an issue with my plugin that I need remedy.
Thank you as always!!
- y2gabs on November 27, 2018 at 5:18 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #19082
Hi there, no worries. Yep, that’s exactly what my configuration and I’ve ensured that the name of each member type matches the name of the role associated to each member type (so that we can reuse the $MemberType variable)
Thanks!
- y2gabs on November 24, 2018 at 6:03 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18990
I’ve even created a custom user-new.php page and removed the role dropdown entirely from the form. Every time I create a new user, the role is not set to the corresponding member type name that is selected in the form. It always sets the role to the default role (subscriber).
- y2gabs on November 24, 2018 at 5:11 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18989
Hi Brajesh, thank you for your reply. I am creating a new user via the add new link in the admin via the standard user-new.php page. the role that should be set via our code is a custom role that is created using the “members” plugin (which allows you to create custom roles). I’d created 3 custom roles, associated them to 3 member types, and have named the roles with the exact same name as the member types. So the variable being passed to the selected member type is also being used to set the new user’s role. Does that make sense? Please let me know if you have any other questions.
Thank you!
- y2gabs on November 23, 2018 at 3:13 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18954
Thanks for the update! Unfortunately that didn’t work, infact modifying the action with edit_user_created_user instead of user_register fails to set the member type (leaves it blank) :/. A little further information if it helps – I’m including this code in the functions.php, not sure if that affects the priority or order in which the role is set (by form element or by our code).
Yes, I can hide the element with css. I was thinking that it being included was overriding out code but using css will work as long as we can get the role set with our code.
Thank you so much for your help! Looking forward to your reply 🙂
- y2gabs on November 22, 2018 at 9:22 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18939
Thank you sir! That worked. One sort of unrelated question remains and I’ve been searching all day for a fix – Given that we’re setting the new user’s role with this function, can you recommend a way to remove the user role drop-down from the user-new form? It’s defaulting to the default role and overriding any role set by the function.
Thank you for your help!
- y2gabs on November 22, 2018 at 6:10 pm in reply to: [Resolved] buddypress Deactivate Account Plugin #18928
Perfect! Thank you sir!
- y2gabs on November 22, 2018 at 6:08 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18927
Thank you! As I’d mentioned before, these new users will be added by a user with role “editor” so I assume I can remove the is_super_admin criteria from the if statement for this to work properly?
Thanks!
- y2gabs on November 22, 2018 at 3:33 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18915
Looks like that worked! One more quick question though, I have created custom roles that match each member type name exactly. Can you recommend an additional piece of code that will set the new user’s role to match the name of the selected member type?