Hi there,
I want to make it so that when a user logs in it automatically redirects them to their primary blog. In my system the primary blog is the same is the username (some hacking, obviously)
I've been beating my head on this. Really wish it was an easy built-in as it is in other cms/blog packages.
Below is where I gave up...
Any help would be appreciated. Thanks in advance.
if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() ){
$user_login = $_POST['log'];
$user_login = sanitize_user( $user_login );
$redirect_to = 'http://'.$user_login.'.mysite.com/';
}
else{
$user_login = $_POST['log'];
$user_login = sanitize_user( $user_login );
$redirect_to = 'http://'.$user_login.'.mysite.com/';
//$redirect_to = $_REQUEST['redirect_to'];
}