Automatic Add to Groups – Including Private Ones

Rather than just sending a request to have the person join the group that they’ve been invited to join, it would be better if they were just automatically a member of that group if they were invited to join by email.

Also, it seems like the group invite only works if the group is a public group. If they are either of the other 2 options, then the invite email doesn’t get sent (let alone joined).

P.S. I figured one feature per forum topic was better since then you could close topics and keep the discussion focused. Thus all the new topics.

Thanks for the info about private groups. I’ll do some testing and figure out the bug.

As for automatic joins, I have mixed feelings about it. I will look into how hard it is (it’d probably involve circumventing some core bp functions) and if it’s not too hard I’ll make it a site wide admin option. In my community, at least, I wouldn’t want the joins to be automatic.

Basically you need to replace line 232 and 233 in by-email.php with:
groups_join_group( $group_id, $user_id );

Of course, you’re more likely to put an option in the admin screen and then do an If () to see if people prefer to automatically add to the group or just invite them which is perfectly fine. You’re the pro at that part.

Ok, I just tested the change I listed above and it resolves the issue of private and hidden group invites not working. If you just change it to have them automatically join the group it goes really smooth.

Now to play with the friend invite. Although, I don’t mind that one sending the email as much. Interesting how we have such different needs based on the site we’re building.

I’ve implemented this on a bunch of different sites and registered hundreds of users with no problems. You’re right that it doesn’t send a notification about them joining a group, but it definitely will add them to the group regardless of the status of the group.

I am looking for a way to allow Group admins to skip the invitation and automatically add members to groups. @techguy, it sounds like this is exactly what your change does, which is so great. Can you tell me how to implement in the most recent version of InviteAnyone (1.0.15)? (What is written on the lines that I’m replacing?) Thank you so much!

I am using the latest version of the Invite Anyone plugin. I believe at this point you might have been referring to line 262 and 263 in by-email.php. I tried commenting out those lines and adding the code above, but it didn’t seem to work. Just so you know I tested it by selecting a user from the list of users and clicking “Send Invites”. I didn’t see that they were automatically added to the group.