Multisite reset password redirect issue
-
Client multisite is having issue with child sites redirecting back to main site for lost password. I found code on a previous post that I think addresses this, but it talks about it being in an mu-plugins folder, which I do not have? The code is this:
<?php function ds_login_redirect( $redirect_to, $request_redirect_to, $user ) { if ($user->ID != 0) { $user_info = get_userdata($user->ID); if ($user_info->primary_blog) { $primary_url = get_blogaddress_by_id($user_info->primary_blog) . 'wp-admin/'; if ($primary_url) { wp_redirect($primary_url); die(); } } } return $redirect_to; } add_filter('login_redirect','ds_login_redirect', 100, 3); ?>
I need the user to be able to request a new password, and be redirected back to THEIR site, not main site, because it is creating confusion.
Current Log in hyperlink points to MAINSITE/wp-login.php
Register/Back to MAINSITE hyperlink points to MAINSITEI need MAINSITE to be CHILDSITE???
Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Multisite reset password redirect issue’ is closed to new replies.