• After impersonating a user, I don’t seem to be able to do it again.

    When I impersonate someone, and click the button to stop impersonating, if I then try to impersonate the same user again, it doesn’t do it. It just takes me to the homepage, but as myself (no bar at the bottom with the button to stop impersonating someone).

    After some time, I can do it again, but I couldn’t say how long I have to wait.

    Any idea why?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Yiannis Christodoulou

    (@yiannistaos)

    Hi @coopersita,

    What is your WordPress version?
    Do you have any other plugins that handle user authentication?

    Thread Starter coopersita

    (@coopersita)

    Hi,

    The only other plugin that deals with authentication is Profile Builder.

    We also have a staging site, with the same plugins and themes installed, and it works fine there.

    Thanks for replying

    Plugin Author Yiannis Christodoulou

    (@yiannistaos)

    Hi @coopersita,

    Thanks for the additional details. Since your staging environment works fine with the same plugins and themes, this points to a server or configuration difference between the two environments.

    Here are a few things to investigate:

    1. Session/Cookie Issues: The time delay before you can impersonate again suggests a session or cookie caching issue. Check if your production server has any aggressive session caching or cookie handling that differs from staging.

    2. Server Configuration:
    – Are both environments running the same server software (Apache/Nginx) and PHP version?
    – Check if there are differences in PHP session settings (session.gc_maxlifetime, session.cookie_lifetime)
    – Compare any security plugins or server-level security rules between the two

    3. Caching Layers:
    – Do you have server-side caching (Redis, Memcached) on production that’s not on staging?
    – Any full-page caching that might be interfering?
    – CloudFlare or CDN caching differences?

    4. Profile Builder Compatibility: Since Profile Builder handles authentication, there might be a conflict in how it manages user sessions. Try temporarily deactivating Profile Builder on production to see if the issue persists.

    Quick tests to try:
    – Clear all caches (server, plugin, browser)
    – Try the impersonation in an incognito/private browser window
    – Check your browser’s developer console for any JavaScript errors when the redirect happens
    – Review your error logs during the failed impersonation attempt

    Could you also confirm your WordPress and PHP versions on both environments? This will help narrow down if it’s a version-specific issue.

    Let me know what you find!

    Regards,
    Yiannis

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.