BuddyDev

Search

[Resolved] Single Member Type fields with no default value, are assigned with Member Types

  • Participant
    Level: Yogi
    Posts: 1114
    calu on #37900

    Hi there, I’m using Member Types Pro, and Single Member Type fields with no default value set, are assigned with Member Types anyway?

    https://imgur.com/Np06fmj

    https://imgur.com/P7tk64A

  • Participant
    Level: Yogi
    Posts: 1114
    calu on #37938

    Hi there, the problem in particular is that if you are using a default Ajax WP registration with name, email, and password, combined with ‘BP Non Editable Profile Fields’ and ‘BuddyPress Profile Completion’ to get users to fill out the required BP fields after registration, users are not warned or aware of that a wrong value for their gender has been set.

    Regards
    Carsten

    https://imgur.com/v5nApTP

  • Participant
    Level: Yogi
    Posts: 1114
    calu on #37992

    Hi there, I think I can see what is wrong here.

    I have created two similar Single Member Types fields

    1. field: Own gender

    2. field: looking for gender

    But of course I can’t have two similar fields with different functions.

    So when users register they are assigned field 2 with their gender, which should have been field 1. (I assume field 2 then overwrites field 1).

    1. How do I solve this gender issue, where I can define both own gender and having a field for which gender users are looking for – also with an option for choosing own gender?

    I have been using this code snippet so far, but this does not take in account members searching own gender:

    Show only users of opposite genders on BuddyPress site
    https://buddydev.com/show-only-users-of-opposite-genders-on-buddypress-site/

    2. Do I need this code using MTP, or does Pro have a build in solution to this problem like showing different directories to different Member Types?

    On the plugin page under ‘Where should I use BuddyPress member types?’
    Dating sites(male/female member type)are mentioned.

    So I guess there must a straight forward answer to this, I just can’t figure it out.

    Can you help?

    Regards
    Carsten

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #38045
    This reply has been marked as private.
  • Participant
    Level: Yogi
    Posts: 1114
    calu on #38050
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #38055

    Hello Carsten,

    Thank you for sharing the details. But, I am unable to check your bp-custom file code here. Provide me the access so that I can modify and check.

    Also, It seems you have inconsistent member types assign to members i.e. Mam assigned to female and vice-versa. Please check

    Regards
    Ravi

  • Participant
    Level: Yogi
    Posts: 1114
    calu on #38057
    This reply has been marked as private.
  • Participant
    Level: Yogi
    Posts: 1114
    calu on #38058
    This reply has been marked as private.
  • Participant
    Level: Yogi
    Posts: 1114
    calu on #38108
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24622
    Brajesh Singh on #38132

    Hi Carsten, Ravi

    The issue is related to the use of 2 member type fields. Please do not use 2 member type fields. Member type fields change the actual member type of the User and if you have 2 fields, it is unpredictable which member type will be set for the user. If you need to assign multiple member type to a user(I see that is not your case), you can use multi member type field insteda.

    In your current case, the best solution is to use the “looking for” as a normal “select” options and use a few lines of custom code to achieve the goal.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved