• This is a problem I face on a couple of sites. I made an update to your code where I redirect users to the error message page instead of going over wp_die();

    Could you make an update where you will give users the option to choose what to do if this problem occurs.

    In general, I haven’t delved deeper into your code, but it would be good to get some work around of this somehow.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    I’d rather fix the problem of why you’re seeing the error message in the first place. This error message should never be seen.

    Is there anything unusual about the configuration of your sites? eg anything that customises the login functionality, cookies, sessions, users, security? Anything unusual about the domain name configuration?

    Thread Starter Ivijan-Stefan Stipic

    (@ivijanstefan)

    For now, there is nothing unusual about logging in, except that users should be able to log in “forever” (for a year or two).

    It seems to me that the cookie from the previous profile expires before the login cookie expires.

    Because I stay logged in with the current user but the previous user is lost.

    I hope that helps you.

    By the way, I really suggest adding some redirection instead of die() because it can be quite useful in this case.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom URL or page instead of error “Could not switch users”’ is closed to new replies.