<?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 Plugin: User Switching</title>
	<atom:link href="/wordpress-plugin-user-switching/feed" rel="self" type="application/rss+xml" />
	<link>https://lud.icro.us/wordpress-plugin-user-switching</link>
	<description></description>
	<lastBuildDate>Fri, 20 Sep 2013 11:07:37 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.7-beta2-25774</generator>
	<item>
		<title>By: Knut Sparhell</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-11040</link>
		<dc:creator><![CDATA[Knut Sparhell]]></dc:creator>
		<pubDate>Wed, 28 Aug 2013 18:55:21 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-11040</guid>
		<description><![CDATA[Thank your for the quick reply!

Yes, &quot;cannot log in&quot; was incorrect. They just can&#039;t access the admin at all, but are redirected to front, as you say. That was exactly what I experienced. So &quot;User Swiching&quot; even lets you test that.

Closed enhancement request, invalid.]]></description>
		<content:encoded><![CDATA[<p>Thank your for the quick reply!</p>
<p>Yes, &#8220;cannot log in&#8221; was incorrect. They just can&#8217;t access the admin at all, but are redirected to front, as you say. That was exactly what I experienced. So &#8220;User Swiching&#8221; even lets you test that.</p>
<p>Closed enhancement request, invalid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-11038</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Wed, 28 Aug 2013 10:03:34 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-11038</guid>
		<description><![CDATA[Thanks for the comment Knut.

A user with no role can still log in (both on Multisite and on single site installs) but they can&#039;t access the admin area. I&#039;ve previously tested the behaviour of User Switching on Multisite for users with no role and it works as expected (you get redirected to the home page after switching).

I just tested this on a single site install and the behaviour is the same. When you switch you get redirected to the home page (because the user does not have the &lt;code&gt;read&lt;/code&gt; capability).

Are you seeing different behaviour? If so it might be due to another plugin on your site. Can you confirm for me?

John]]></description>
		<content:encoded><![CDATA[<p>Thanks for the comment Knut.</p>
<p>A user with no role can still log in (both on Multisite and on single site installs) but they can&#8217;t access the admin area. I&#8217;ve previously tested the behaviour of User Switching on Multisite for users with no role and it works as expected (you get redirected to the home page after switching).</p>
<p>I just tested this on a single site install and the behaviour is the same. When you switch you get redirected to the home page (because the user does not have the <code>read</code> capability).</p>
<p>Are you seeing different behaviour? If so it might be due to another plugin on your site. Can you confirm for me?</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knut Sparhell</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-11037</link>
		<dc:creator><![CDATA[Knut Sparhell]]></dc:creator>
		<pubDate>Wed, 28 Aug 2013 06:33:32 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-11037</guid>
		<description><![CDATA[When a user has &quot;No role on this site&quot; then switching user will be unsuccessful. I suggest not showing the switch link for users that have no role, because they cannot log in at all.

This is very different form the role &quot;Subscriber&quot;, since they can log in. Without any role the switch link should not be shown for this user. On multisite this is very relevant.]]></description>
		<content:encoded><![CDATA[<p>When a user has &#8220;No role on this site&#8221; then switching user will be unsuccessful. I suggest not showing the switch link for users that have no role, because they cannot log in at all.</p>
<p>This is very different form the role &#8220;Subscriber&#8221;, since they can log in. Without any role the switch link should not be shown for this user. On multisite this is very relevant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scimon</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-10971</link>
		<dc:creator><![CDATA[scimon]]></dc:creator>
		<pubDate>Thu, 01 Aug 2013 20:08:18 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-10971</guid>
		<description><![CDATA[I tracked the problem down to another module that had a hook on init to start a session of one did not exist; &lt;a href=&quot;http://pippinsplugins.com/password-protect-taxonomy-terms-and-all-posts-in-the-terms/&quot; rel=&quot;nofollow&quot;&gt;Pippin&#039;s password protection&lt;/a&gt;.

&lt;code&gt;
  if(!session_id()){
    add_action( &#039;init&#039;, &#039;session_start&#039;);
  }
&lt;/code&gt;

It uses the default priority, as does user switching, but the plugins name comes earlier in the alphabet... Since user switching is a rather low level thing, it would seem to make sense for it to have a higher priority (smaller number). This could save others from having to tweak arbitrary plugins they might be using.]]></description>
		<content:encoded><![CDATA[<p>I tracked the problem down to another module that had a hook on init to start a session of one did not exist; <a href="http://pippinsplugins.com/password-protect-taxonomy-terms-and-all-posts-in-the-terms/" rel="nofollow">Pippin&#8217;s password protection</a>.</p>
<p><code><br />
  if(!session_id()){<br />
    add_action( 'init', 'session_start');<br />
  }<br />
</code></p>
<p>It uses the default priority, as does user switching, but the plugins name comes earlier in the alphabet&#8230; Since user switching is a rather low level thing, it would seem to make sense for it to have a higher priority (smaller number). This could save others from having to tweak arbitrary plugins they might be using.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-10969</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Sun, 28 Jul 2013 17:27:42 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-10969</guid>
		<description><![CDATA[Very odd. Not sure what to suggest if I&#039;m honest. That&#039;s not how nonces work, so I don&#039;t know why you&#039;re seeing that behaviour. Maybe try disabling any other plugins you might have active and see if the problem disappears?]]></description>
		<content:encoded><![CDATA[<p>Very odd. Not sure what to suggest if I&#8217;m honest. That&#8217;s not how nonces work, so I don&#8217;t know why you&#8217;re seeing that behaviour. Maybe try disabling any other plugins you might have active and see if the problem disappears?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scimon</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-10968</link>
		<dc:creator><![CDATA[scimon]]></dc:creator>
		<pubDate>Fri, 26 Jul 2013 17:24:51 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-10968</guid>
		<description><![CDATA[It&#039;s an observation actually. Once I&#039;ve become a user, then returned to myself, future attempts to become them simply result in me being sent to the dashboard with a message of &quot;Switched to admin (admin).&quot; I do not have any nonce customization. The point of the link was to suggest a way to create fresh nonces, since they seem to somehow become tainted once used.]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s an observation actually. Once I&#8217;ve become a user, then returned to myself, future attempts to become them simply result in me being sent to the dashboard with a message of &#8220;Switched to admin (admin).&#8221; I do not have any nonce customization. The point of the link was to suggest a way to create fresh nonces, since they seem to somehow become tainted once used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-10967</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Fri, 26 Jul 2013 16:57:50 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-10967</guid>
		<description><![CDATA[Hi Stephen,

What&#039;s giving you the impression you can only switch once per two ticks? A nonce in WordPress is valid for two ticks (24 hours) and can be used repeatedly, just as you say in your article. You can switch to a given user as many times as you like within that period using the same nonce.

Do you have a custom nonce system on your site that&#039;s doing something different?

John]]></description>
		<content:encoded><![CDATA[<p>Hi Stephen,</p>
<p>What&#8217;s giving you the impression you can only switch once per two ticks? A nonce in WordPress is valid for two ticks (24 hours) and can be used repeatedly, just as you say in your article. You can switch to a given user as many times as you like within that period using the same nonce.</p>
<p>Do you have a custom nonce system on your site that&#8217;s doing something different?</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scimon</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-10966</link>
		<dc:creator><![CDATA[scimon]]></dc:creator>
		<pubDate>Fri, 26 Jul 2013 14:53:09 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-10966</guid>
		<description><![CDATA[I have found this plug-in immensely useful in testing out patches and bugs. Unfortunately, it seems that due to your use of standard WP nonces in the switching URI, it is not possible to switch to a specific user more than once per &quot;two ticks&quot; (up to 24 hours). Is there anyway you could reset the nonce when switching back? Or use a more time-sensitive nonce e.g; http://www.stephenharris.info/2013/nonces-that-are-used-only-once/]]></description>
		<content:encoded><![CDATA[<p>I have found this plug-in immensely useful in testing out patches and bugs. Unfortunately, it seems that due to your use of standard WP nonces in the switching URI, it is not possible to switch to a specific user more than once per &#8220;two ticks&#8221; (up to 24 hours). Is there anyway you could reset the nonce when switching back? Or use a more time-sensitive nonce e.g; <a href="http://www.stephenharris.info/2013/nonces-that-are-used-only-once/" rel="nofollow">http://www.stephenharris.info/2013/nonces-that-are-used-only-once/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7042</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 13:32:03 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7042</guid>
		<description><![CDATA[I&#039;ve tweaked this and added it to GitHub: https://github.com/johnbillion/user-switching-for-regular-admins]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve tweaked this and added it to GitHub: <a href="https://github.com/johnbillion/user-switching-for-regular-admins" rel="nofollow">https://github.com/johnbillion/user-switching-for-regular-admins</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Hellyer</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7043</link>
		<dc:creator><![CDATA[Ryan Hellyer]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 13:31:14 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7043</guid>
		<description><![CDATA[Relying on plugins loading in a certain order never really works well. All I know is that it&#039;s definitely based on the order they&#039;re stored in the database. I assume that order is controlled by the order you activate them in, but I&#039;m not certain.]]></description>
		<content:encoded><![CDATA[<p>Relying on plugins loading in a certain order never really works well. All I know is that it&#8217;s definitely based on the order they&#8217;re stored in the database. I assume that order is controlled by the order you activate them in, but I&#8217;m not certain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7041</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 13:12:46 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7041</guid>
		<description><![CDATA[Interesting. I wonder if WP loads plugins in the order they were activated. I was always under the impression they were loaded in alphabetical order according to their filename, but maybe not. Glad you&#039;ve got it sorted.]]></description>
		<content:encoded><![CDATA[<p>Interesting. I wonder if WP loads plugins in the order they were activated. I was always under the impression they were loaded in alphabetical order according to their filename, but maybe not. Glad you&#8217;ve got it sorted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Hellyer</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7040</link>
		<dc:creator><![CDATA[Ryan Hellyer]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 12:35:45 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7040</guid>
		<description><![CDATA[I deactivated both plugins on the original site, then reactivated them and it worked prefectly :)

Thanks for all your help John! Much appreciated.]]></description>
		<content:encoded><![CDATA[<p>I deactivated both plugins on the original site, then reactivated them and it worked prefectly :)</p>
<p>Thanks for all your help John! Much appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Hellyer</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7039</link>
		<dc:creator><![CDATA[Ryan Hellyer]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 12:33:30 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7039</guid>
		<description><![CDATA[I decided to try this on a brand new install and it worked fine :)
I&#039;m not sure why the other one didn&#039;t work.]]></description>
		<content:encoded><![CDATA[<p>I decided to try this on a brand new install and it worked fine :)<br />
I&#8217;m not sure why the other one didn&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Hellyer</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7038</link>
		<dc:creator><![CDATA[Ryan Hellyer]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 12:23:55 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7038</guid>
		<description><![CDATA[Thanks for your help.

I don&#039;t get any errors now, but it isn&#039;t showing the &quot;Switch to&quot; link for the regular admins :(]]></description>
		<content:encoded><![CDATA[<p>Thanks for your help.</p>
<p>I don&#8217;t get any errors now, but it isn&#8217;t showing the &#8220;Switch to&#8221; link for the regular admins :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7037</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 12:10:26 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7037</guid>
		<description><![CDATA[Sounds like your &quot;User switching for regular admins&quot; plugin is being loaded before User Switching. I have User Switching network-activated so I don&#039;t have that problem.

I&#039;ve updated the Gist at https://gist.github.com/johnbillion/4604330 so it overrides the hooks on the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Give it a try.]]></description>
		<content:encoded><![CDATA[<p>Sounds like your &#8220;User switching for regular admins&#8221; plugin is being loaded before User Switching. I have User Switching network-activated so I don&#8217;t have that problem.</p>
<p>I&#8217;ve updated the Gist at <a href="https://gist.github.com/johnbillion/4604330" rel="nofollow">https://gist.github.com/johnbillion/4604330</a> so it overrides the hooks on the <code>plugins_loaded</code> hook. Give it a try.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Hellyer</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7036</link>
		<dc:creator><![CDATA[Ryan Hellyer]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 11:52:33 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7036</guid>
		<description><![CDATA[I get the following error message:
http://pastebin.com/Nexnznai

When used with this plugin, which is just copy and paste of your Gist into a plugin.
http://stuff.ryanhellyer.net/user-switching-admins-only.zip]]></description>
		<content:encoded><![CDATA[<p>I get the following error message:<br />
<a href="http://pastebin.com/Nexnznai" rel="nofollow">http://pastebin.com/Nexnznai</a></p>
<p>When used with this plugin, which is just copy and paste of your Gist into a plugin.<br />
<a href="http://stuff.ryanhellyer.net/user-switching-admins-only.zip" rel="nofollow">http://stuff.ryanhellyer.net/user-switching-admins-only.zip</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7035</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Tue, 05 Feb 2013 15:30:59 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7035</guid>
		<description><![CDATA[What was the error Ryan?]]></description>
		<content:encoded><![CDATA[<p>What was the error Ryan?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Hellyer</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7034</link>
		<dc:creator><![CDATA[Ryan Hellyer]]></dc:creator>
		<pubDate>Tue, 05 Feb 2013 15:29:01 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7034</guid>
		<description><![CDATA[Hmmm, I tried the code here as a plugin, but it just served an error ... https://gist.github.com/4604330

Any ideas on how I should implement it?]]></description>
		<content:encoded><![CDATA[<p>Hmmm, I tried the code here as a plugin, but it just served an error &#8230; <a href="https://gist.github.com/4604330" rel="nofollow">https://gist.github.com/4604330</a></p>
<p>Any ideas on how I should implement it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Hellyer</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7033</link>
		<dc:creator><![CDATA[Ryan Hellyer]]></dc:creator>
		<pubDate>Wed, 23 Jan 2013 10:55:37 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7033</guid>
		<description><![CDATA[Awesome! That sounds like exactly what I was looking to achieve :)]]></description>
		<content:encoded><![CDATA[<p>Awesome! That sounds like exactly what I was looking to achieve :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Blackbourn</title>
		<link>https://lud.icro.us/wordpress-plugin-user-switching#comment-7032</link>
		<dc:creator><![CDATA[John Blackbourn]]></dc:creator>
		<pubDate>Wed, 23 Jan 2013 10:54:45 +0000</pubDate>
		<guid isPermaLink="false">https://lud.icro.us/?p=96#comment-7032</guid>
		<description><![CDATA[Hi Ryan,

In order to switch into another user&#039;s account, you need the ability to edit that user. The reason for this of course is that switching into a user account gives you the ability to edit that user&#039;s account. Therefore, the ability to switch to a user needs to mirror the ability to edit that user.

Regular Admins on multisite don&#039;t have the ability to edit other users. This is why they can&#039;t switch.

I&#039;ve &lt;a href=&quot;https://gist.github.com/4604330&quot; rel=&quot;nofollow&quot;&gt;written some code that allows regular admins to switch users&lt;/a&gt; (but not switch into super admin accounts) but you should be aware that using it effectively allows regular admins to edit other users&#039; accounts by way of switching in to them.

Hope this helps.

John]]></description>
		<content:encoded><![CDATA[<p>Hi Ryan,</p>
<p>In order to switch into another user&#8217;s account, you need the ability to edit that user. The reason for this of course is that switching into a user account gives you the ability to edit that user&#8217;s account. Therefore, the ability to switch to a user needs to mirror the ability to edit that user.</p>
<p>Regular Admins on multisite don&#8217;t have the ability to edit other users. This is why they can&#8217;t switch.</p>
<p>I&#8217;ve <a href="https://gist.github.com/4604330" rel="nofollow">written some code that allows regular admins to switch users</a> (but not switch into super admin accounts) but you should be aware that using it effectively allows regular admins to edit other users&#8217; accounts by way of switching in to them.</p>
<p>Hope this helps.</p>
<p>John</p>
]]></content:encoded>
	</item>
</channel>
</rss>
