WordPress.org

Ready to get started?Download WordPress

Forums

BP GTM System
Default Role not assigned for Private Groups (2 posts)

  1. ngkokkee
    Member
    Posted 2 years ago #

    I am using GTM 1.9.5 with buddypress 1.5.5 and found the following problem.

    When a user is accepted into a private group, the user is not assigned any role. After digging around the code, I found that the action groups_join_group is not called when the group admin accepts a user request to join the group.

    I inserted a quick fix in bp-gtm-system\lib\roles.php after the function bp_gtm_def_add_as_guest to add an action for groups_membership_accepted. Not sure if this is sufficient, let me know if I missed something.

    function bp_gtm_def_add_as_guest_reversed($user_id, $group_id){
        return bp_gtm_def_add_as_guest($group_id, $user_id);
    }
    add_action('groups_membership_accepted', 'bp_gtm_def_add_as_guest_reversed', 10, 2);

    The order of parameters for user_id and group_id is reversed in groups_membership_accepted.

    http://wordpress.org/extend/plugins/bp-gtm-system/

  2. ngkokkee
    Member
    Posted 2 years ago #

    Missing a handler for user accepting invites. Needed by the autojoin plugin.

    add_action('groups_accept_invite', 'bp_gtm_def_add_as_guest_reversed', 10, 2);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags