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

  1. ngkokkee
    Posted 3 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.


  2. ngkokkee
    Posted 3 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

  • BP GTM System
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic