I’ve been searching for a while on the net but with no luck, how can I automatically register the user who registers to the network directly also in the site example.com/account/?
There are 3 sites installed in my WordPress multisite:
- example.com/
- example.com/account/
- example.com/go/
How can I automatically register the user only on the account site?
The following code works for me:
add_action( 'wpmu_activate_user', 'myplugin_registration_save', 10, 1 );
function myplugin_registration_save( $user_id ) {
$blog_id = 13;
add_user_to_blog($blog_id, $user_id, "subscriber");
}
answered Jan 11, 2022 at 13:44
source : https://wordpress.stackexchange.com/questions/401213/automatically-add-a-registered-user-on-the-wordpress-multisite-network-even-to-j
Leave a Reply