Let users auto follow specific members
-
Hello,
I want members after their registration to auto follow specific users. I found this code on the web but without any instructions where I should implement it.
<?php add_action('um_after_new_user_register','um_auto_follow_artists',10,2); function um_auto_follow_artists( $user_id, $args ){ global $ultimatemember, $um_followers; $follow_users = array( 'rjtmusic', 'james-peacock', 'carl-thomson', 'jonathan-proud', 'stu-dawson', 'carly-mckee', ); foreach( $follow_users as $username ){ $follow_user = get_user_by( 'login', $username ); $um_followers->api->add( $follow_user->ID, $user_id ); } } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Let users auto follow specific members’ is closed to new replies.