<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Redirect WordPress users to different locations after they log in</title>
	<atom:link href="http://www.theblog.ca/wplogin-redirect/feed" rel="self" type="application/rss+xml" />
	<link>http://www.theblog.ca/wplogin-redirect</link>
	<description>Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more</description>
	<lastBuildDate>Fri, 12 Mar 2010 23:56:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Zoinks! Graphics</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12566</link>
		<dc:creator>Zoinks! Graphics</dc:creator>
		<pubDate>Fri, 26 Feb 2010 22:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12566</guid>
		<description>Pretty awesome plugin... Works great with Hide Admin Panels on WP 2.9.2 !</description>
		<content:encoded><![CDATA[<p>Pretty awesome plugin&#8230; Works great with Hide Admin Panels on WP 2.9.2 !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter G</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12529</link>
		<dc:creator>Peter G</dc:creator>
		<pubDate>Mon, 22 Feb 2010 03:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12529</guid>
		<description>Thanks so much for this plugin! I had been hard-coding some of the same functionality for months now, but never had such an easy-to-use, configurable way of doing it.

At first, I did experience the same issue as eric B. Every time I tried to update the plugin settings I was redirected back to my login page. After some time spent eliminating possible plugin conflicts I realized the issue was an incorrect form URL (for my site at least).

wplogin_redirect.php has four lines similar to the following:
&lt;form name=&quot;...&quot; action=&quot;&lt;?php print $_SERVER[&#039;PHP_SELF&#039;] . &#039;?page=&#039; . basename(__FILE__); ?&gt;&quot; method=&quot;post&quot;&gt;

This resulted in a post to /wordpress/wp-admin/options-general.php?page=wplogin_redirect.php. While my blog does physically reside in the wordpress directory, it is treated as the root of the site through URL rewrites.

My solution was to make the following change to the lines in question:
&lt;form name=&quot;...&quot; action=&quot;&lt;?php print $_SERVER[&#039;REQUEST_URI&#039;] ?&gt;&quot; method=&quot;post&quot;&gt;

i.e. &quot;$_SERVER[&#039;PHP_SELF&#039;] . &#039;?page=&#039; . basename(__FILE__)&quot; becomes &quot;$_SERVER[&#039;REQUEST_URI&#039;]&quot;

I hope this helps someone out.

&lt;strong&gt;Reply from Peter: Thanks for this.  For version 1.7.3 I took a slightly different approach -- just eliminating the $_SERVER part altogether.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Thanks so much for this plugin! I had been hard-coding some of the same functionality for months now, but never had such an easy-to-use, configurable way of doing it.</p>
<p>At first, I did experience the same issue as eric B. Every time I tried to update the plugin settings I was redirected back to my login page. After some time spent eliminating possible plugin conflicts I realized the issue was an incorrect form URL (for my site at least).</p>
<p>wplogin_redirect.php has four lines similar to the following:<br />
&lt;form name=&quot;&#8230;&quot; action=&quot;&lt;?php print $_SERVER[&#039;PHP_SELF&#039;] . &#039;?page=&#039; . basename(__FILE__); ?&gt;&quot; method=&quot;post&quot;&gt;</p>
<p>This resulted in a post to /wordpress/wp-admin/options-general.php?page=wplogin_redirect.php. While my blog does physically reside in the wordpress directory, it is treated as the root of the site through URL rewrites.</p>
<p>My solution was to make the following change to the lines in question:<br />
&lt;form name=&quot;&#8230;&quot; action=&quot;&lt;?php print $_SERVER[&#039;REQUEST_URI&#039;] ?&gt;&quot; method=&quot;post&quot;&gt;</p>
<p>i.e. &quot;$_SERVER[&#039;PHP_SELF&#039;] . &#039;?page=&#039; . basename(__FILE__)&quot; becomes &quot;$_SERVER[&#039;REQUEST_URI&#039;]&quot;</p>
<p>I hope this helps someone out.</p>
<p><strong>Reply from Peter: Thanks for this.  For version 1.7.3 I took a slightly different approach &#8212; just eliminating the $_SERVER part altogether.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12528</link>
		<dc:creator>Roger</dc:creator>
		<pubDate>Sun, 21 Feb 2010 23:33:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12528</guid>
		<description>Aha

Problem Solved!!!!.... If you wish to redirect users back to their original login page the following code appears to work (at least Outside of the Loop). You will need to format it for your particular case but here it is.....

_______________________
&lt;?php  if (is_user_logged_in()){ ?&gt; 
&lt;?php global $wpdb, $rul_db_addresses, $current_user;
      get_currentuserinfo();
	  $user_home_page = $wpdb-&gt;get_var(&#039;SELECT rul_url FROM &#039; . $rul_db_addresses . 
        &#039; WHERE rul_type = \&#039;user\&#039; AND rul_value = \&#039;&#039; . $current_user-&gt;user_login . &#039;\&#039; LIMIT 1&#039;); ?&gt; 

&lt;a href=&quot;&lt;?php echo $user_home_page;?&gt;&quot;&gt;&lt;?php _e(&#039;User Home Page&#039;);?&gt;&lt;/a&gt;
&lt;?php } else { ?&gt;
Do something else if user not logged in
&lt;?php } ?&gt;
_______________________
Cheers Rog
http://www.popcornphotography.com.au</description>
		<content:encoded><![CDATA[<p>Aha</p>
<p>Problem Solved!!!!&#8230;. If you wish to redirect users back to their original login page the following code appears to work (at least Outside of the Loop). You will need to format it for your particular case but here it is&#8230;..</p>
<p>_______________________<br />
&lt;?php  if (is_user_logged_in()){ ?&gt;<br />
&lt;?php global $wpdb, $rul_db_addresses, $current_user;<br />
      get_currentuserinfo();<br />
	  $user_home_page = $wpdb-&gt;get_var(&#039;SELECT rul_url FROM &#039; . $rul_db_addresses .<br />
        &#039; WHERE rul_type = \&#039;user\&#039; AND rul_value = \&#039;&#039; . $current_user-&gt;user_login . &#039;\&#039; LIMIT 1&#039;); ?&gt; </p>
<p>&lt;a href=&quot;&lt;?php echo $user_home_page;?&gt;&quot;&gt;&lt;?php _e(&#039;User Home Page&#039;);?&gt;&lt;/a&gt;<br />
&lt;?php } else { ?&gt;<br />
Do something else if user not logged in<br />
&lt;?php } ?&gt;<br />
_______________________<br />
Cheers Rog<br />
<a href="http://www.popcornphotography.com.au" rel="nofollow">http://www.popcornphotography.com.au</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12523</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Sat, 20 Feb 2010 17:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12523</guid>
		<description>Thanks for this great plugin.  

I did just discover that &quot;Custom Login Logo&quot; plugin conflicts with this plugin though.  EG: If you visit a page that requires login (say wp-admin/) it redirects to the login page, but fails to redirect back and simply loops the login page without an error.

Thanks,
-darren

&lt;strong&gt;Reply from Peter: My plugin simply makes use of a normal WordPress hook, so if the other plugin is trying to rewrite some core WordPress functionality, there&#039;s not much that can be done to cater to plugins like it on a general basis.  I&#039;d suggest looking at other ways to customize your login page, such as &lt;a href=&quot;http://www.wprecipes.com/customize-wordpress-login-logo-without-a-plugin&quot; rel=&quot;nofollow&quot;&gt;this CSS tip&lt;/a&gt;.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for this great plugin.  </p>
<p>I did just discover that &quot;Custom Login Logo&quot; plugin conflicts with this plugin though.  EG: If you visit a page that requires login (say wp-admin/) it redirects to the login page, but fails to redirect back and simply loops the login page without an error.</p>
<p>Thanks,<br />
-darren</p>
<p><strong>Reply from Peter: My plugin simply makes use of a normal WordPress hook, so if the other plugin is trying to rewrite some core WordPress functionality, there&#8217;s not much that can be done to cater to plugins like it on a general basis.  I&#8217;d suggest looking at other ways to customize your login page, such as <a href="http://www.wprecipes.com/customize-wordpress-login-logo-without-a-plugin" rel="nofollow">this CSS tip</a>.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: el_Vania</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12498</link>
		<dc:creator>el_Vania</dc:creator>
		<pubDate>Thu, 18 Feb 2010 19:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12498</guid>
		<description>Guy, this is the plugin I&#039;ve been searching for years.
Works silky and fine... flawlessly.

Thanks for this masterpiece of plugin, mate.

Keep up the good work.

Greetings.

Ivan.</description>
		<content:encoded><![CDATA[<p>Guy, this is the plugin I&#039;ve been searching for years.<br />
Works silky and fine&#8230; flawlessly.</p>
<p>Thanks for this masterpiece of plugin, mate.</p>
<p>Keep up the good work.</p>
<p>Greetings.</p>
<p>Ivan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12488</link>
		<dc:creator>Roger</dc:creator>
		<pubDate>Thu, 18 Feb 2010 06:32:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12488</guid>
		<description>Hi Peter

Thanks for the great plugin.

I too want to be able for the user to navigate to other parts of my site and then get back to their specific login page. I have read each and every comment here and tried to write an SQL Query but it is not quite working. I wish to use it Outside the Loop in the header.php

Here is where I am up to...

--------------------------------
&lt;?php
$rul_db_addresses = $wpdb-&gt;prefix . &#039;login_redirects&#039;;
global $wpdb, $rul_db_addresses;
global $current_user;
get_currentuserinfo();

$usergallerys = &quot;SELECT * FROM $rul_db_addresses WHERE rul_value = $current_user-&gt;user_login &quot;;
$usergallery = $wpdb-&gt;get_results($usergallerys, OBJECT);
	echo $usergallery-&gt;rul_value;
 ?&gt;
-------------------------------

Am I on the right track????

Cheers and thanks in advance for any help you can offer.

Rog</description>
		<content:encoded><![CDATA[<p>Hi Peter</p>
<p>Thanks for the great plugin.</p>
<p>I too want to be able for the user to navigate to other parts of my site and then get back to their specific login page. I have read each and every comment here and tried to write an SQL Query but it is not quite working. I wish to use it Outside the Loop in the header.php</p>
<p>Here is where I am up to&#8230;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&lt;?php<br />
$rul_db_addresses = $wpdb-&gt;prefix . &#039;login_redirects&#039;;<br />
global $wpdb, $rul_db_addresses;<br />
global $current_user;<br />
get_currentuserinfo();</p>
<p>$usergallerys = &quot;SELECT * FROM $rul_db_addresses WHERE rul_value = $current_user-&gt;user_login &quot;;<br />
$usergallery = $wpdb-&gt;get_results($usergallerys, OBJECT);<br />
	echo $usergallery-&gt;rul_value;<br />
 ?&gt;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Am I on the right track????</p>
<p>Cheers and thanks in advance for any help you can offer.</p>
<p>Rog</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Faye</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12454</link>
		<dc:creator>Faye</dc:creator>
		<pubDate>Tue, 16 Feb 2010 16:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12454</guid>
		<description>Great plugin Peter, and thank you for your work on it. I&#039;m in a similar situation to another commenter in that in addition to users being redirected to specific pages on login, I&#039;d also like them to be able to get back to their specific page with a link at any time whe they&#039;re logged in. I&#039;m no kind of coder at all, so writing a database query is beyond my ken - can you advise? Many thanks!

&lt;strong&gt;Reply from Peter: Please see &lt;a href=&quot;http://www.theblog.ca/wplogin-redirect#comment-11089&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt;&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Great plugin Peter, and thank you for your work on it. I&#039;m in a similar situation to another commenter in that in addition to users being redirected to specific pages on login, I&#039;d also like them to be able to get back to their specific page with a link at any time whe they&#039;re logged in. I&#039;m no kind of coder at all, so writing a database query is beyond my ken &#8211; can you advise? Many thanks!</p>
<p><strong>Reply from Peter: Please see <a href="http://www.theblog.ca/wplogin-redirect#comment-11089" rel="nofollow">this comment</a></strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: piggy</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12400</link>
		<dc:creator>piggy</dc:creator>
		<pubDate>Tue, 09 Feb 2010 13:15:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12400</guid>
		<description>hi! thank you so much for this plugin! this is exactly what i need right now :)</description>
		<content:encoded><![CDATA[<p>hi! thank you so much for this plugin! this is exactly what i need right now <img src='http://www.theblog.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12353</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 01 Feb 2010 06:48:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12353</guid>
		<description>Do I need to setup a redirect for the admin? Because when I set it up for subscriber, and when I try to login as admin, I cant. It keeps showing me the login.php page. I need to go into my FTP and change the foldername to something else in order to get back in as admin.

&lt;strong&gt;Reply from Peter: No, you shouldn&#039;t need any default or admin redirects. I can&#039;t replicate your problem, but it might be due to a clash with another plugin, especially if that plugin overrides any core WordPress functionalities.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Do I need to setup a redirect for the admin? Because when I set it up for subscriber, and when I try to login as admin, I cant. It keeps showing me the login.php page. I need to go into my FTP and change the foldername to something else in order to get back in as admin.</p>
<p><strong>Reply from Peter: No, you shouldn&#8217;t need any default or admin redirects. I can&#8217;t replicate your problem, but it might be due to a clash with another plugin, especially if that plugin overrides any core WordPress functionalities.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frac</title>
		<link>http://www.theblog.ca/wplogin-redirect/comment-page-3#comment-12270</link>
		<dc:creator>Frac</dc:creator>
		<pubDate>Sun, 17 Jan 2010 01:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=266#comment-12270</guid>
		<description>This is just this ticket. All I use it for is to have new &quot;subscriber&quot; users redirected to the home page rather than the dashboard when they log in. 

They can still go to their dashboard using the &quot;Site Admin&quot; link. I found that new users were confused when the &quot;site&quot; disappeared and this weird &quot;control panel&quot; showed up instead. Particularly if they&#039;re were just setting up a quick account to leave a comment.</description>
		<content:encoded><![CDATA[<p>This is just this ticket. All I use it for is to have new &quot;subscriber&quot; users redirected to the home page rather than the dashboard when they log in. </p>
<p>They can still go to their dashboard using the &quot;Site Admin&quot; link. I found that new users were confused when the &quot;site&quot; disappeared and this weird &quot;control panel&quot; showed up instead. Particularly if they&#039;re were just setting up a quick account to leave a comment.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
