Jump to content

Login redirect


carnold

Recommended Posts

Sorry if i post this in the wrong forum. someone plaese move if in fact it is posted in the wrong forum.

 

What i am trying to do is have users of my blog (run with mu wordpress which is essentially the same as wp) login on the main blog, http://mytimewithgod.net, and then be redirected to their blog. Here is some code from wp-login.php:

 

if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() )

$redirect_to = 'http://'.$user_login.'mysite.com';

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'];

}

}

 

Can someone help shed some light on this?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.