Arrow

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

Back to the login redirect plugin page
 
Current User: Guest
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

link back to users redirected page

Reply to Post Add a New Topic
UserPost

5:35 am
September 6, 2011


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.

7:18 am
September 6, 2011


Peter

Admin

posts 732

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.

7:31 am
September 7, 2011


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.

8:52 am
September 7, 2011


Peter

Admin

posts 732

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.

10:07 am
September 7, 2011


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.

Reply to Post

Reply to Topic:
link back to users redirected page

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
8 + 9