Arrow

link back to users redirected page | Peter's Login Redirect | Forum

Back to the login redirect plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
link back to users redirected page
September 6, 2011
5:35 am
Martin
Guest

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.

September 6, 2011
7:18 am
Peter
Admin
Forum Posts: 841
Offline

Hi,

In the plugin file, look at the function "rul_register" -- that might provide you with what you're looking for, or at least something that gets you close.

September 7, 2011
7:31 am
Martin
Guest

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 if (is_user_logged_in()){ ?>
<?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.....&quot; 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.

September 7, 2011
8:52 am
Peter
Admin
Forum Posts: 841
Offline

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.

September 7, 2011
10:07 am
Martin
Guest

Yes thats right Peter, each user has their own URL as it is their protected members area page. I have tried again logging in and out in IE, still the same problem, thanks anyway - back to the drawing board eith this one.

Maritn.