Skip to:
Content

BuddyPress.org

Ticket #2733: 2733.001.patch

File 2733.001.patch, 895 bytes (added by r-a-y, 14 years ago)
  • buddypress/bp-groups.php

     
    17541754        if ( groups_is_user_member( $user_id, $group_id ) )
    17551755                return true;
    17561756
    1757         if ( !$bp->groups->current_group )
     1757        if ( $group_id )
    17581758                $bp->groups->current_group = new BP_Groups_Group( $group_id );
    17591759
    17601760        $new_member = new BP_Groups_Member;
     
    17731773        groups_record_activity( array(
    17741774                'action' => apply_filters( 'groups_activity_joined_group', sprintf( __( '%s joined the group %s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . esc_attr( $bp->groups->current_group->name ) . '</a>' ) ),
    17751775                'type' => 'joined_group',
    1776                 'item_id' => $group_id
     1776                'item_id' => $group_id,
     1777                'user_id' => $user_id
    17771778        ) );
    17781779
    17791780        /* Modify group meta */