link back to users redirected page | Peter's Login Redirect | Forum
Back to the login redirect plugin page
5:35 am
Just wanted to say thanks very much for a really good plugin. I would like to have a text link placed inside my themes header where the logged in user can go back to their original redirected page. Instead of having to log in all the time to the page I'm sending them to.
Is this possible?
Thanks very much,
Martin.
7:31 am
Hi Peter,
Almost got it to work but for some reason in Internet Explorer the user is returned to the homepage of the blog and not their orignial redirected page. Here is my code:
<?php global $wpdb, $rul_db_addresses, $current_user;
get_currentuserinfo();
$user_home_page = $wpdb->get_var("SELECT rul_url FROM '. $rul_db_addresses .' WHERE rul_type = 'user' AND rul_value = " . $current_user->user_login . '' LIMIT 1"); ?>
<li><a href="<?php echo $user_home_page;?>" title="Client Area">Client Area</a></li>
<?php } else { ?>
<li><a href="http://www.domain.com/wp-login....." title="Client Login">Login</a></li>
<?php } ?>
Like I said it works perfectly in Firefox but not in IE. Be grateful if you could take a look at my code.
Thanks.
I don't see a reason why the code should behave differently in a different browser, other than the fact that you might not be logged in or you might be logged in with a different user.
Note that the MySQL code you're using is assuming that you have specific redirect URLs defined for each user. I'm not sure if that's your intention, but if you look at the rul_register example, it uses a function that runs through the entire list of redirect fallback rules.