WordPress.org

Ready to get started?Download WordPress

Forums

User Switching
[resolved] Some users will switch, some won't (15 posts)

  1. lshub
    Member
    Posted 1 year ago #

    This has been such a handy plugin. I've been using it for the last several weeks and love it, but today it started not working correctly.

    I can switch to some users, but not others. Some users will switch, but when I go to "all posts" for that user it reverts to the admin and shows all posts for the site. Once this happens, I can't switch to that user again.

    The only thing I've done differently today was to add the plugin, "Add Link to Facebook". I don't know if this caused the problem with your plugin or not. I have since deleted the Facebook plugin and deactivated the app on the Facebook side. And I deleted the User Switching plugin and reinstalled it. Also I shut down and restarted my computer. Nothing has fixed the problem.

    Any advice please?

    http://wordpress.org/extend/plugins/user-switching/

  2. John Blackbourn
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Ishub,

    No idea what's going on here. Do you have any other plugins installed which might be doing something related to the login mechanisms?

    What do you mean when you say "Once this happens, I can't switch to that user again."? In what way can you not switch? Do you still see the 'Switch To' link next to each user on the 'Users' screen?

    John

  3. lshub
    Member
    Posted 1 year ago #

    John, I did a quick check today and it seems to be back to normal.

    At this time, I don't have any other plugins installed that would affect the login mechanisms. I am still hoping to add a plugin to link to Facebook, but really think that was the problem yesterday.

    The 'Switch To' link always showed, but it wouldn't switch users. The page switched but not the user. I remained logged in as the admin.

    LaDonna

  4. Curt44319
    Member
    Posted 10 months ago #

    It appears admin can not switch *TO* a user who does not have edit user capabilities ???
    This isn't useful !
    Need to do more testing ( disabling other plugins ) but so far, it looked so promising...
    I'm getting a "You do not have sufficient permissions to access this page." error, and any attempt to move on has me logged out, but the switch back link *is* on the log-in page, and *does* switch back to admin.

    Methinks this topic needs changed to "unresolved" temporarily at least, especially since there was no solution for the previous poster.
    As usual, I'll provide as much info as you deem necessary.
    Let me look for conflicting plugins first...

  5. John Blackbourn
    Member
    Plugin Author

    Posted 10 months ago #

    It is possible to switch to other users who don't have the ability to edit users. You'll just be redirected to the admin dashboard.

    Let me know what you find once you've disabled your other plugins.

    John

  6. Curt44319
    Member
    Posted 10 months ago #

    Oh ? Maybe....
    I *hate* the dashboard with all my being, so I have it disabled for any and everyone I could possibly disable it for !
    That's not everyone, but that could explain it ??
    If so, how can I ( including hack the code ) redirect that to the home/welcome page, or something that the user would have access to ?

    BTW: I didn't expect such a quick response. BRAVO !

  7. Curt44319
    Member
    Posted 10 months ago #

    Interesting.
    There seems to be no pattern to which users admin can or can not switch to. When it switches, it works fine. When it doesn't, sometimes entering a different URL, like to the profile page, works, but sometimes not. The default trying to go to wp-admin is a very serious problem in itself, but secondary for me, although getting rid of that complication would make troubleshooting MUCH easier.
    Unable to identify a conflicting plug-in. The randomness makes it very, very difficult. I can't say with certainty, but it appears it's not a plugin conflict.
    Unfortunately, two different users with identical values in the database, ( as many as I know to look at directly ) one will work, and one won't.
    Perhaps if you can tell me which row/column would be the controlling entry ?

  8. John Blackbourn
    Member
    Plugin Author

    Posted 10 months ago #

    At its heart, the User Switching plugin is very simple. There really isn't a lot that can go wrong. It's most likely that there is a plugin or a theme on your site that is causing you problems, possibly one that deals with user permissions.

    If you can isolate the plugin that's causing the problem then I'll be happy to look at it and see what the issue is. Without that, there's not a lot I can do.

    John

  9. Curt44319
    Member
    Posted 10 months ago #

    I've been unable to isolate another plugin that might be causing the problem. I have a suspicion that it's the mingle plug-in, but it appears the developer has abandoned that one, and I haven't yet found another way to replace all of that functionality.

    ( even built a whole 'nother test site to try all sorts of things, none of which have proven productive )

    Hacking another default other than wp-admin *would* be a help. How ?

    Using default 2010 theme. No theme customization at all, other than the thememylogin plugin.

    Otherwise, sometimes it works, sometimes it doesn't, though it does appear consistent for any particular user. If it switches to a particular user, it works as expected. If it doesn't switch, nothing seems to make it switch, and that seems repeatable.

    Thanks...

  10. John Blackbourn
    Member
    Plugin Author

    Posted 10 months ago #

    Hacking another default other than wp-admin *would* be a help. How ?

    That sounds like applying a fix to something that shouldn't be broken. The redirect after you switch does a permissions check. If you don't have the read capability you'll be redirected to the home page instead of the dashboard.

    I *hate* the dashboard with all my being, so I have it disabled for any and everyone I could possibly disable it for !
    That's not everyone, but that could explain it ??

    This sounds like the cause of the problem. When you switch into a user whose dashboard is disabled you'll get a permissions error if that's how you're disabling the dashboard. You should be performing a redirect to the home page instead of exiting with a permissions error. Much more user friendly.

    I can't be of any more help as it's clear the issue is localised to your particular site.

    John

  11. Curt44319
    Member
    Posted 10 months ago #

    I shall pursue that angle, and confirm when I can.

  12. Curt44319
    Member
    Posted 10 months ago #

    Well, I had gotten a redirect to work, before some other who-knows screwed that up.
    Meantime, with or without redirect, "switch to" at this point merely logs out, but with the "switch back" link that still works.
    Confusing.

  13. Curt44319
    Member
    Posted 10 months ago #

    Latest....
    Latest version of the switcher ( 0.8 ) works fine, except that it can only switch to a user who has been recently logged in.
    Haven't yet nailed down the time frame, but attempting to switch to a user logged in within the last 24 hours definitely works fine.
    Switching to a user that hasn't logged in in a week definitely does not, though the switch back link does work even from the "you are not logged in" page.

    On another note,
    "That sounds like applying a fix to something that shouldn't be broken. The redirect after you switch does a permissions check. If you don't have the read capability you'll be redirected to the home page instead of the dashboard."
    I would agree, but I get a "you don't have permission" page.
    Manually typing the address of a page that does have permission does work.

  14. John Blackbourn
    Member
    Plugin Author

    Posted 10 months ago #

    Curt,

    It sounds like whatever plugin or code you're using to modify user permissions on your site is right royally screwing things up. None of the issues you describe are due to or related to User Switching. You need to fix the code on your site.

    John.

  15. Curt44319
    Member
    Posted 10 months ago #

    Turns out that a HUGE part of my issue is/was that wordpress "read" capability isn't a capability to read the site, as one would intuitively assume, but is a permission to access wp-admin.
    As such, I'd been granting "read" to allow reading, which I now know isn't what it does, ( anyone can read the site, as "read" implies, but doesn't do ) and then going through all sorts of gyrations to disallow reading wp-admin, which is about all "read" really does.
    SO, my first problem with this plugin isn't a problem with this plugin at all, but merely an artifact of exceedingly poor choice of permissioning labeling in wordpress core.
    I've been fighting myself due to incorrect, counter intuitive, or at least exceedingly poor documentation on part of wordpress core, having almost nothing to do with this plugin, or any other plugin directly.

    Indirectly, you're right ! When up means down, things get royally screwed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.