<?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: WordPress Auto-Login</title>
	<atom:link href="http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 15 Jul 2010 15:24:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andy Bailey</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-35050</link>
		<dc:creator>Andy Bailey</dc:creator>
		<pubDate>Sat, 10 Jul 2010 18:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-35050</guid>
		<description>I just used this (updated) code for a single sign on solution and it worked!! thanks so much, it saved me paying 67$ for a premium plugin because I wanted just that single feature.

I hooked it into the wp action and modified it a bit to use the user name stored in a session var and woopy-doo, it auto logs on a user if they&#039;ve already logged on to the other site using the same username . wo0t! :-)</description>
		<content:encoded><![CDATA[<p>I just used this (updated) code for a single sign on solution and it worked!! thanks so much, it saved me paying 67$ for a premium plugin because I wanted just that single feature.</p>
<p>I hooked it into the wp action and modified it a bit to use the user name stored in a session var and woopy-doo, it auto logs on a user if they&#8217;ve already logged on to the other site using the same username . wo0t! <img src='http://www.lbsharp.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amol</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-34940</link>
		<dc:creator>Amol</dc:creator>
		<pubDate>Mon, 05 Jul 2010 03:34:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-34940</guid>
		<description>Thanks a lot for the piece of code. Got into instant action on my blog.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the piece of code. Got into instant action on my blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius Patrascu</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33890</link>
		<dc:creator>Marius Patrascu</dc:creator>
		<pubDate>Fri, 23 Apr 2010 12:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33890</guid>
		<description>Can you pull in external script Wordpress user system this way?

To check if he&#039;s logged in and show something like &quot;Welcome %usersname% &quot; ? 

I&#039;m noob when it comes to Wordpress coding.

I see code it&#039;s for auto-loggin, but If I wanna check outside WP if user is logged in in Wordpress...can it be done?

Thank you!</description>
		<content:encoded><![CDATA[<p>Can you pull in external script Wordpress user system this way?</p>
<p>To check if he&#8217;s logged in and show something like &#8220;Welcome %usersname% &#8221; ? </p>
<p>I&#8217;m noob when it comes to Wordpress coding.</p>
<p>I see code it&#8217;s for auto-loggin, but If I wanna check outside WP if user is logged in in Wordpress&#8230;can it be done?</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reine</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33588</link>
		<dc:creator>Reine</dc:creator>
		<pubDate>Tue, 23 Mar 2010 23:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33588</guid>
		<description>Leon, thank you so much, you saved me hours and hours of frustration!</description>
		<content:encoded><![CDATA[<p>Leon, thank you so much, you saved me hours and hours of frustration!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shallwelin</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33413</link>
		<dc:creator>shallwelin</dc:creator>
		<pubDate>Fri, 05 Mar 2010 05:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33413</guid>
		<description>one problem is that you can&#039;t normally logout by clicking the logout link in wordpress after inserting the code in pluggable.php. when you click back through browser&#039;s go back button after logout, you still can do any action.</description>
		<content:encoded><![CDATA[<p>one problem is that you can&#8217;t normally logout by clicking the logout link in wordpress after inserting the code in pluggable.php. when you click back through browser&#8217;s go back button after logout, you still can do any action.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thierry</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33407</link>
		<dc:creator>Thierry</dc:creator>
		<pubDate>Thu, 04 Mar 2010 15:25:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33407</guid>
		<description>My error is Call to undefined function  add_action()

But this function is used in WP elsewhere...</description>
		<content:encoded><![CDATA[<p>My error is Call to undefined function  add_action()</p>
<p>But this function is used in WP elsewhere&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thierry</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33406</link>
		<dc:creator>Thierry</dc:creator>
		<pubDate>Thu, 04 Mar 2010 15:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33406</guid>
		<description>Thank you for this code.

I would like to be automatically logged in as &quot;admin&quot; et put in functions.php this code : 

function auto_login() {
    if (!is_user_logged_in()) {
        $user_login = &#039;admin&#039;;
        $user = get_userdatabylogin($user_login);
        $user_id = $user-&gt;ID;
        wp_set_current_user($user_id, $user_login);
        wp_set_auth_cookie($user_id);
        do_action(&#039;wp_login&#039;, $user_login);
    }
}
add_action(&#039;init&#039;, &#039;auto_login&#039;);

but it doesn&#039;t work. I don&#039;t have any errors, only a blank page. 
It should work no? (wp 2.9.2)</description>
		<content:encoded><![CDATA[<p>Thank you for this code.</p>
<p>I would like to be automatically logged in as &#8220;admin&#8221; et put in functions.php this code : </p>
<p>function auto_login() {<br />
    if (!is_user_logged_in()) {<br />
        $user_login = &#8216;admin&#8217;;<br />
        $user = get_userdatabylogin($user_login);<br />
        $user_id = $user-&gt;ID;<br />
        wp_set_current_user($user_id, $user_login);<br />
        wp_set_auth_cookie($user_id);<br />
        do_action(&#8216;wp_login&#8217;, $user_login);<br />
    }<br />
}<br />
add_action(&#8216;init&#8217;, &#8216;auto_login&#8217;);</p>
<p>but it doesn&#8217;t work. I don&#8217;t have any errors, only a blank page.<br />
It should work no? (wp 2.9.2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shallwelin</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33402</link>
		<dc:creator>shallwelin</dc:creator>
		<pubDate>Thu, 04 Mar 2010 10:28:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33402</guid>
		<description>Works beautifully for me with Wordpress2.9. Thanks a lot. BTW, I am planning to make it autologin depending on different current user not just guest or admin account.</description>
		<content:encoded><![CDATA[<p>Works beautifully for me with Wordpress2.9. Thanks a lot. BTW, I am planning to make it autologin depending on different current user not just guest or admin account.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33310</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 25 Feb 2010 02:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33310</guid>
		<description>Hi Leon, Thanks for the speedy reply =) 

At the moment i have everything running off the one login/authentication table (based off the Wordpress wp_users table); which looks to be where i am running into complications.  I will try and separate the login into Site login and Wordpress login and see if i can get the less elegant solution operational while i keep trying to get everything working cleanly off the one login system.  

Although i may have to mimic each user in both tables the solution my be all that is needed for a small user base.  I will keep you posted on how things go.  Thanks again.</description>
		<content:encoded><![CDATA[<p>Hi Leon, Thanks for the speedy reply =) </p>
<p>At the moment i have everything running off the one login/authentication table (based off the Wordpress wp_users table); which looks to be where i am running into complications.  I will try and separate the login into Site login and Wordpress login and see if i can get the less elegant solution operational while i keep trying to get everything working cleanly off the one login system.  </p>
<p>Although i may have to mimic each user in both tables the solution my be all that is needed for a small user base.  I will keep you posted on how things go.  Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leon</title>
		<link>http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/comment-page-1/#comment-33302</link>
		<dc:creator>leon</dc:creator>
		<pubDate>Wed, 24 Feb 2010 15:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.lbsharp.com/wordpress/index.php/2007/12/10/wordpress-auto-login/#comment-33302</guid>
		<description>Paul,

The least elegant solution to your problem is to simply create a Jane Doe account in Wordpress as well as in your user management system. Using my code you can tell Wordpress which user should be logged in (as long as there is a Wordress account available for that user). A more elegant solution would be to integrate the authentication process so that all users’ credentials will be in the same table. Implementing this, however, is much more involved.

Good luck, Leon</description>
		<content:encoded><![CDATA[<p>Paul,</p>
<p>The least elegant solution to your problem is to simply create a Jane Doe account in Wordpress as well as in your user management system. Using my code you can tell Wordpress which user should be logged in (as long as there is a Wordress account available for that user). A more elegant solution would be to integrate the authentication process so that all users’ credentials will be in the same table. Implementing this, however, is much more involved.</p>
<p>Good luck, Leon</p>
]]></content:encoded>
	</item>
</channel>
</rss>
