Browse: Home / Snippets /

Add new user to group

Contents


Snippet #

add_action( 'user_register', function ( $user_id = 0 ){
	if ( !empty( $user_id ) ) {
		$LD_GROUP_IDS = array( 12, 34 );
		learndash_set_users_group_ids( $user_id, $LD_GROUP_IDS );
	}
});