carnold Posted January 31, 2008 Share Posted January 31, 2008 Hello all! I use multi-user wordpress for blogging software. I am trying to redirect users to their blog after a successful login. The code i am using is: if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() ) $redirect_to = 'http://'.$user_login.'mysite.net'; else $redirect_to = $_REQUEST['redirect_to']; if ( $_POST ) { $user_login = $_POST['log']; $user_login = sanitize_user( $user_login ); $user_pass = $_POST['pwd']; $rememberme = $_POST['rememberme']; } else { $cookie_login = wp_get_cookie_login(); if ( ! empty($cookie_login) ) { $using_cookie = true; $user_login = $cookie_login['login']; $user_pass = $cookie_login['password']; } } Notice the part in bold? This redirects to the main blog page. Is there anyone out there that uses WP that can help? Or anyone that can help? Quote Link to comment https://forums.phpfreaks.com/topic/88672-login-redirect/ Share on other sites More sharing options...
trq Posted January 31, 2008 Share Posted January 31, 2008 Notice the part in bold? This redirects to the main blog page. Is there anyone out there that uses WP that can help? Or anyone that can help? What exactly is the problem? Quote Link to comment https://forums.phpfreaks.com/topic/88672-login-redirect/#findComment-454111 Share on other sites More sharing options...
laffin Posted January 31, 2008 Share Posted January 31, 2008 i think, question is how to create subdomains for user accounts. Quote Link to comment https://forums.phpfreaks.com/topic/88672-login-redirect/#findComment-454112 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.