Changing set password URL in new user ‘Login Details’ email on Mulitisite network

Question

I’m importing users into a site (SITE_4) within a Multisite network. When the users get their ‘Login Details’ email, it looks like the following:

Username: <username>

To set your password, visit the following address:

https://<URL of SITE_1 in Multisite network>/wp-login.php?action=rp&key=<key>&login=<username>

https://<URL of SITE_4 in Multisite network>/wp-login.php

When the users click on the first URL, they’re taken to the wrong Multisite site (SITE_1), set their passwords, try and login, are redirected to the correct Multisite site (SITE_4), and have to login again.

I’d like to change the first URL in the email to the URL of SITE_4, as SITE_1 is an internal dev site and the users should never see it. I take it that these URLs are controlled in wp_new_user_notification() (https://developer.wordpress.org/reference/functions/wp_new_user_notification/), but I’m not sure where to go from there.

0
lowercasename 2 months 0 Answers 7 views 0

Leave an answer