Multisite Usage and Redirection to Subsite
-
Hi,
I love your plugin and I am interested in buying the full paid package. Currently i am building a multisite network project and testing it with ultimate members.
I have checked login/redirect usage in ultimate members it is pretty cool, but i am having issues when i set up seperate login redirect page for each user role on subsite.
>> What i want to achieve?
Use single login form on main site and redirect users to subsite home page?Problem:
When user login from main site it is not redirected to users subsequent subsite home page, and instead it shows user profile on the main site. It will work even if it can show profile on subsite but for that user need to login from same subsite.>> What i have done so far?
I have tried a below snippet and deactivted the ultimate member plugin and it works fine and redirects the users to their respective subsite home page. I have even tested it with buddypress and it works fine.
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) . ‘/’ ;
if ($primary_url) {
wp_redirect($primary_url);
die();
}
}
}
return $redirect_to;
}
add_filter(‘login_redirect’,’ds_login_redirect’, 100, 3);>> What help is required?
Need help to disable redirect function for ultimate member however the keep the plugin active for remaining functions.Or I any other solution you can recommend please. I have also tried user role base redirect but it still keeps the user on main site when login from main site and does not take it the url defined for the role.
I will be very happy if you can assist me regarding this issue.
The page I need help with: [log in to see the link]
- The topic ‘Multisite Usage and Redirection to Subsite’ is closed to new replies.