Created
October 27, 2012 05:04
-
-
Save imjjss/3963013 to your computer and use it in GitHub Desktop.
Automatically add new users to a group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function automatic_group_membership( $user_id ) { | |
if( !$user_id ) return false; | |
groups_accept_invite( $user_id, <# group ID #> ); | |
} | |
add_action( 'bp_core_activated_user', 'automatic_group_membership' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment