BuddyDev

Search

[Resolved] After updating Paid Memberships Pro status all member types get selected

  • Participant
    Level: Initiated
    Posts: 2
    Josh Jonas on #33845

    Hello!

    I’m using the latest version of Paid Memberships Pro and BuddyPress Xprofile Custom Field Types.

    When i go from the Admin backend and manually update a user profile and assign him/her a membership status such as “Verified” (which is what i’m currently using), all member types get assigned to the member regardless of what i had previously assigned them on their profile. I’m using “Man” and “Female” to filter through gender as it was suggested here: https://buddydev.com/show-only-users-of-opposite-genders-on-buddypress-site/

    The main issue with this is that if all member types get selected while using what is mentioned in the blog post, all members get the “Acess denied” error when trying to see a profile because they have both genders assigned in their profiles and they should only be able to see the opposite gender only.

    Is there any way to prevent this from happening? Because the only way i’ve found so far is to update the membership and then open the profile again and manually update the correct member type in the profile.

    Thank you for your help and have a great day/night wherever you are!

    <3

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #33862

    Hi Josh,
    Welcome to BuddyDev forums.

    It seems that the restrictions are applied by PMPro.
    I will suggest to chekc if PMPro is able to auto assign 2 member types( one for gender and another for your Verified etc).

    I do not see any reason for the access denied issue caused by code form the blog post.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 2
    Josh Jonas on #33866

    Hello Brajesh,

    I do not want to have more than one member type per user, in fact, that’s the problem!

    When i edit an existing user profile to change the membership status, the plugin Xprofile Custom Field Types assigns both existing member types to the user, when originally there was only one member type assigned to it. That’s why i signed up here to see if you could fix it.

    “I do not see any reason for the access denied issue caused by code form the blog post.”

    Let me explain the issue. What the code from your blog post does is show only the opposite gender of the current user so for example if a male is browsing the directory, it’ll only show females and viceversa.

    Now, what it also does is restrict males from entering other male’s profiles.

    Lets say i edit a female profile and the plugin (God knows why) assigns the user the member types “male” and “female” at the same time, so when the male goes to open the female profile, gets access denied because… he isn’t suppoused to be able to look into other male’s profiles!

    Isn’t there some kind of code i could place in bp-custom.php that would lock the current member type from being editable or restrict only one member type per user? Preferably the first one becaue if the plugin changes a male to female and i do not realize then the male would be looking to males at the directory and that is not my aim with buddypress.

    Should you need me to clarify any futrher, please do let me know.

    Thanks and looking forward to your reply!

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #33867

    Hi Josh,
    I am sorry but it seems there is a confusion

    When i edit an existing user profile to change the membership status, the plugin Xprofile Custom Field Types assigns both existing member types to the user, when originally there was only one member type assigned to it. That’s why i signed up here to see if you could fix it.

    The Xprofile Custom Field Types plugin does not have anything to do with member type.

    Is there any chance you are using our “BuddyPress Xprofile Member Type Field” plugin ? Also, Unless you are doing it explicitly, why the plugin will assign two member types is beyond my understanding.

    The plugin provides a select or radio(using code) and these are not multi fields.

    Please provide me the steps to re-create it and I will assist you.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 2
    Josh Jonas on #33879

    I’ve fixed it, i had misconfigured the membership to set two member types without knowing.

    Thanks for the support though, you’re great guy!

    Keep up the good work! <3

The topic ‘ [Resolved] After updating Paid Memberships Pro status all member types get selected’ is closed to new replies.

This topic is: resolved