Problems with group invitation
Since the last update of BP, I have two problems with group invitations :
– In one of my plugin, to invite a member to a group, I was doing :
groups_invite_user( array( 'user_id' => $user_id, 'group_id' => $group_id, 'inviter_id' => $creator_id, 'is_confirmed' => 0 ) ); groups_send_invites( $creator_id, $group_id );
But now, this code takes all the invitations already sent for this group, and it make a sql query for each of them… so it’s very slow
So how can I just send 1 invitation easyli ?
– Second problem : I have done a filter to customize group invitations :
add_filter('groups_notification_group_invites_message' , array($this , 'my_groups_notification_group_invites_message') , 110 , 7);
and the function :
public function my_groups_notification_group_invites_message($message, $group, $inviter_name, $inviter_link, $invites_link, $group_link, $settings_link)
But it doesn’t work now … it was working perfectly.
Do you know where is the bug in the code ?
Thanks a lot 🙂
- The topic ‘Problems with group invitation’ is closed to new replies.