Replies
Hi Brajesh,
function bbit_auto_follow_users( $user_id ){
if ( function_exists(‘bp_follow_get_following’) ) :// Add your user ids here
$users_to_follow = array( ‘2’ ); // user id 2 is BossBetforeach ( $users_to_follow as $follow_user ) {
bp_follow_start_following( array( ‘leader_id’ => $follow_user, ‘follower_id’ => $user_id ) );// If you don’t want them to follow back remove the line below
// bp_follow_start_following( array( ‘leader_id’ => $user_id, ‘follower_id’ => $follow_user ) );
}endif;
}
add_action(‘bp_core_activated_user’, ‘bbit_auto_follow_users’, 10, 1);I have this code to auto – follow after registration .
VincenzoHi Brajesh,
This code “bp_core_activated_user”, is present in the function- bp.php file
What can I do to make it work ?
I hope you can help me because it’s important for my job
Forgot to add: although the icon keeps “loading” and nothing happens, the registration completes with no confirmation email and when I refresh the page I’m logged in