BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 23
    y2gabs on 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!

  • Participant
    Level: Enlightened
    Posts: 23
    y2gabs on 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!!

  • Participant
    Level: Enlightened
    Posts: 23

    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!

  • Participant
    Level: Enlightened
    Posts: 23

    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).

  • Participant
    Level: Enlightened
    Posts: 23

    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!

  • Participant
    Level: Enlightened
    Posts: 23

    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 🙂

  • Participant
    Level: Enlightened
    Posts: 23

    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!

  • Participant
    Level: Enlightened
    Posts: 23
    y2gabs on in reply to: [Resolved] buddypress Deactivate Account Plugin #18928

    Perfect! Thank you sir!

  • Participant
    Level: Enlightened
    Posts: 23

    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!

  • Participant
    Level: Enlightened
    Posts: 23

    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?