Login-Redirect on Multisite to assigned Blog
-
Hi,
you already implemented a redirect Login for WPML. But I use multilingual press + multisite on my Blog. So I started to find a solution to redirect all users after the login to their Blog/Language they are assigned to.
Here is the code, I added right after the //WPML global redirect:
//Multisite global redirect to assigned blog 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) { $redirect = $primary_url; } } }
Perhaps this helps other people or you want to use that in your next update.
- The topic ‘Login-Redirect on Multisite to assigned Blog’ is closed to new replies.