<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Peter&#039;s Useful Crap - Forum: Peter's Login Redirect</title>
	<link>http://www.theblog.ca/peter-forum/peters-login-redirect</link>
	<description><![CDATA[Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more]]></description>
	<generator>Simple:Press Version 5.5.1</generator>
	<atom:link href="http://www.theblog.ca/peter-forum/peters-login-redirect/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Peter on ****ERROR: Unknown error adding user-specific redirect for user ****</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3846</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3846</guid>
        	        	<description><![CDATA[<p>Sorry for the confusion. The fact that the page is "A2 Hosting" is not important -- the instructions on that page on how to turn on WordPress's debug settings should apply to any host.</p>
]]></description>
        	        	<pubDate>Mon, 27 Oct 2014 07:49:06 +0000</pubDate>
        </item>
        <item>
        	<title>chronicle on ****ERROR: Unknown error adding user-specific redirect for user ****</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3845</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3845</guid>
        	        	<description><![CDATA[<p>The site is hosted through Host Gator. The website is: <a href="http://taramorenophotography.com">Tara Moreno Photography</a>  You sent me a link to A2 Hosting in your prior response...</p>
]]></description>
        	        	<pubDate>Mon, 27 Oct 2014 07:32:55 +0000</pubDate>
        </item>
        <item>
        	<title>Peter on ****ERROR: Unknown error adding user-specific redirect for user ****</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3844</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3844</guid>
        	        	<description><![CDATA[<p>Hi, I would recommend turning on WordPress's debug settings in order to find out the exact error:</p>
<p><a href="http://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/wordpress2/debugging-wordpress" rel="nofollow"><a href="http://www.a2hosting.com/kb/in" rel="nofollow">http://www.a2hosting.com/kb/in</a>.....-wordpress</a></p>
]]></description>
        	        	<pubDate>Sat, 25 Oct 2014 20:47:49 +0000</pubDate>
        </item>
        <item>
        	<title>chronicle on ****ERROR: Unknown error adding user-specific redirect for user ****</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3843</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/error-unknown-error-adding-user-specific-redirect-for-user#p3843</guid>
        	        	<description><![CDATA[<p>We are getting an error when trying to add a specific url to a user login:<br />
****ERROR: Unknown error adding user-specific redirect for user Alexa****<br />
There are no other redirect plugins running on the site. Prior to updating plugins and the wordpress core everything was working correctly. </p>
<p>For website: <a href="http://taramorenophotography.com"><br />
Please advise</a></p>
]]></description>
        	        	<pubDate>Fri, 24 Oct 2014 11:45:46 +0000</pubDate>
        </item>
        <item>
        	<title>Peter on Logout works great, but log in keeps going to my account page</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-works-great-but-log-in-keeps-going-to-my-account-page#p3832</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-works-great-but-log-in-keeps-going-to-my-account-page#p3832</guid>
        	        	<description><![CDATA[<p>You can inspect the source of the login form to see if it's posting to anywhere other than wp-login.php.</p>
<p>You could also disable plugin one by one to see which is responsible.</p>
<p>Or, you can use something like this to see what's hooked into the "login_redirect" filter:<br />
<a href="http://www.rarst.net/script/debug-wordpress-hooks/" rel="nofollow"><a href="http://www.rarst.net/script/de" rel="nofollow">http://www.rarst.net/script/de</a>.....ess-hooks/</a></p>
]]></description>
        	        	<pubDate>Tue, 26 Aug 2014 16:47:13 +0000</pubDate>
        </item>
        <item>
        	<title>kjetterman on Logout works great, but log in keeps going to my account page</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-works-great-but-log-in-keeps-going-to-my-account-page#p3831</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-works-great-but-log-in-keeps-going-to-my-account-page#p3831</guid>
        	        	<description><![CDATA[<p>How can I figure out which plugin is causing the overwrite?  I do not have Google Captcha installed...</p>
]]></description>
        	        	<pubDate>Tue, 26 Aug 2014 13:58:18 +0000</pubDate>
        </item>
        <item>
        	<title>fcvolunteer on Login Redirect Users Registered Before X Date</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3826</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3826</guid>
        	        	<description><![CDATA[<p>I figured it out <img class="spSmiley" src="http://www.theblog.ca/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="spSmiley" />  I had installed the plugin as well so once I deleted it everything seems to work.</p>
<p>Thanks so much for the plugin and the code help!</p>
]]></description>
        	        	<pubDate>Fri, 15 Aug 2014 12:34:19 +0000</pubDate>
        </item>
        <item>
        	<title>fcvolunteer on Login Redirect Users Registered Before X Date</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3824</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3824</guid>
        	        	<description><![CDATA[<p>Wow! Thanks Peter, that was fast! I'm obviously making a stupid mistake because I'm getting the following error :-/</p>
<blockquote><p>Fatal error: Cannot redeclare redirectOnFirstLogin() (previously declared in /home/content/58/8803458/html/wp-content/plugins/peters_redirect_first_login_meta/peters_redirect_first_login_meta.php:11) in /home/content/58/8803458/html/wp-content/themes/JeremysJump/functions.php on line 112</p>
</blockquote>
<p>Here's my code:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit521" value="Select Code" onclick="spjSelectCode('sfcode521');" /></p>
<div class="sfcode" id="sfcode521">// Send new users to a special page<br />
function redirectOnFirstLogin( $redirect_to, $requested_redirect_to, $user )<br />
{<br />
    // URL to redirect to<br />
    $redirect_url = 'http://myrealurlhere.com/renew-registration';<br />
    // How many times to redirect the user<br />
    $num_redirects = 1;</p>
<p>	// If they're on the login page, don't do anything<br />
   // if( !isset( $user-&#62;user_login ) )<br />
   // {<br />
   //     return $redirect_to;<br />
   // }</p>
<p>    $key_name = 'redirect_on_first_login';<br />
    // Third parameter ensures that the result is a string<br />
    $current_redirect_value = get_user_meta( $user-&#62;ID, $key_name, true );<br />
	if( strtotime( $user-&#62;user_registered ) &#60; ( mktime( 0, 0, 0, 1, 1, 2014 ) )<br />
        &#38;&#38; ( '' == $current_redirect_value &#124;&#124; intval( $current_redirect_value ) &#60; $num_redirects )<br />
      )<br />
    {<br />
        if( '' != $current_redirect_value )<br />
        {<br />
            $num_redirects = intval( $current_redirect_value ) + 1;<br />
        }<br />
        update_user_meta( $user-&#62;ID, $key_name, $num_redirects );<br />
        return $redirect_url;<br />
    }<br />
    else<br />
    {<br />
        return $redirect_to;<br />
    }<br />
}</p>
<p>add_filter( 'login_redirect', 'redirectOnFirstLogin', 10, 3 );
</p>
</div>
]]></description>
        	        	<pubDate>Fri, 15 Aug 2014 12:11:59 +0000</pubDate>
        </item>
        <item>
        	<title>Peter on Login Redirect Users Registered Before X Date</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3823</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3823</guid>
        	        	<description><![CDATA[<p>Hi, you can build a date using PHP's mktime function.</p>
<p>Thus, your check can be something like this:</p>
<p>if( strtotime( $user-&#62;user_registered ) &#60; mktime( 0, 0, 0, 1, 1, 2014 ) )</p>
]]></description>
        	        	<pubDate>Fri, 15 Aug 2014 11:44:39 +0000</pubDate>
        </item>
        <item>
        	<title>fcvolunteer on Login Redirect Users Registered Before X Date</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3822</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/login-redirect-users-registered-before-x-date#p3822</guid>
        	        	<description><![CDATA[<p>Hi Peter,</p>
<p>Thanks for the reply. Pardon my ignorance, I'm still a little confused about how to tweak the code. How do I get the message period to be a date instead of seconds? I need to make sure that it only redirects to my new registration form if the user has registered before 1/1/14?</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Fri, 15 Aug 2014 11:37:31 +0000</pubDate>
        </item>
</channel>
</rss>