• Resolved datschge

    (@datschge)


    I got following fatal error:

    PHP Fatal error: Uncaught Error: Call to undefined function login_header() in /var/www/html/wp-content/plugins/user-switching/user-switching.php:216

    The cause may be a corner case. I switched to another user in a separate window, where I then caused custom code to execute that force ended the current session. The still open wordpress admin dashboard in the first window then popped up a login window with the ability to switch back to my actual user account. That worked, but also showed an error page within that popup window as well as added above error in the error log. The switch and site worked fine thereafter though.

    In any case thanks for this great plugin!

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

    (@johnbillion)

    WordPress Core Developer

    It looks like somehow this workflow caused the interim-login parameter to be passed to a URL other than wp-login.php. Not sure how.

    I can see that User Switching needs to check that the function exists here, so I’ll get that fixed.

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    The fatal has been fixed in version 1.5.8.

    I think the workflow you’re using will still result in an interim login screen that doesn’t do what you expect, but at least there won’t be a fatal.

    Thread Starter datschge

    (@datschge)

    Thanks!

    I just replayed the workflow that led to the fatal error before now using version 1.5.8. I can confirm that there is no longer any error log of any kind. Switching back to my own account within the popup now leads to the admin dashboard to be loaded within the login popup as well instead closing the popup which looks funky but is no real problem whatsoever. Thanks again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error: Call to undefined function login_header()’ is closed to new replies.