BuddyDev

Search

Assiging Member Type Doesn’t Add User to Group

  • Participant
    Level: Initiated
    Posts: 7
    Phil on #48148

    We are having a problem where when the relevant member type is assigned to a user, the user is not getting added to the appropriate group. The group is private. However, even if I change group visibility to ‘public’ assigning the member type in the admin dashboard doesn’t result in the user getting added to the group.

    I have confirmed that the settings are as they should be according to the documentation. Users are not created through registration, however. Rather, they are created via WP All Import, thus, bypassing any of the WP registration and BP activation loops. However, since I am manually assigning the member type after the import I do no think this matters.

    I believe it may be a problem with the database syntax – from the WP debug log:

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘WHERE type = ‘membertypes” at line 1 for query SELECT id FROM WHERE type = ‘membertypes’ made by require_once(‘wp-admin/admin.php’), do_action(‘load-users.php’), WP_Hook->do_action, WP_Hook->apply_filters, BP_Members_Admin->users_table_process_bulk_type_change, bp_set_member_type, do_action(‘bp_set_member_type’), WP_Hook->do_action, WP_Hook->apply_filters, BPMTP_Member_Types_Pro_Hooks->member_types_set, do_action(‘bpmtp_set_member_type’), WP_Hook->do_action, WP_Hook->apply_filters, BPMTP_Xprofile_Mapping_Helper->update_field_data_for_multi, bpmtp_get_multi_member_type_field_ids

    Is the Member Types Pro plugin not the correct plugin to add users to a group in this manner? I only as because I also see you have an auto-join plugin.

    Any help would be greatly appreciated.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #48150

    Hi Phil,
    Welcome to BuddyDev.
    Do you have BuddyPress xprofile component enabled? from the above error, it seems the xprofile tab is not found(not table is selected in the syntax).

    Please visit Dashboard->BuddyPress->Settings->Components and make sure “Extended Profile” is enabled.

    To answer your other question, these 2 have different use case. If you only need group joining to be automated, use Auto Join Groups, if you need other functionality offered by member types pro, then you may keep using it.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    Phil on #48153

    Thank you, Brajesh. We aren’t using public/user accessible profiles at this time. However, even if I enable the component (which resolves the SQL error), it still doesn’t add the user to the group upon member type assignment.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #48169

    Hi Phil,
    Please check the mappings. The plugin is working for us.
    My assumption is, you have some issue with mapping member type to group.

    If not, Please provide the steps to re-create it.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    Phil on #48199

    *** Group names, roles, member type names and URLs below have been made generic since the group is private ***

    BuddyPress 10.6.0 Group settings:

    Group: My Secret Group
    Privacy: Hidden (have tried Public and Private)
    Who can invite others to this group? Group Admins Only (have tried all others)
    Group Forum setting ENABLED

    BuddyPress Member Types Pro 1.5.0:

    Member Type Name: Secret Member

    Plural Label: Secret Members
    Singular Label: Secret Member

    Enable Directory? NO

    Directory Slug: Blank

    On First Login, Redirect to: mydomain/groups/my-secret-group

    On Login, Redirect to: mydomain/groups/my-secret-group

    On Account activation, Redirect to: mydomain/groups/my-secret-group

    Set default landing tab for user profile: NO

    Default profile tab slug: Blank

    The user will be assigned the associated role(s) when their member type is updated. Secret Member Role

    Select Group: My Secret Group

    Sync groups to member type. ENABLED (have tried disabled – members of this group will never be a member of the other group(s) we have).

    Procedure:

    1. Associate Secret Member Role (same as WP Subscriber role but used to limit access to specific areas if the site) to ‘Secret Member’ member type in WP Admin > Settings > Member Types
    2. Create Member Type as settings above.
    3. Create user (either manually or via WP All Import – no public, self registration) with a WP user role of Secret Member Role.
    4. Select user in WP Admin > Users and assign a Member Type (from the drop-down menu above user list) of Secret Member (since for whatever reason, getting the Secret Member Role doesn’t automatically give the user the Secret Member member type).
    5. Check My Secret Group. No new members have been added.

    It may be easier for you to look at it. I can set up a staging copy and grant you access to it.

    Thank you!

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #48204

    Hi Phil,
    Thank you for the details. I don’t see any issue with it.

    Please provide me access to a staging site and I can look for the problem.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    Phil on #48334
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #48337
    This reply has been marked as private.
  • Participant
    Level: Initiated
    Posts: 7
    Phil on #48355
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #48379

    Hi,
    It is still not available.

    Please login with my user account and check the Users & Settings menu for the availability of member types.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved