Title: emilialaunchit's Replies | WordPress.org

---

# emilialaunchit

  [  ](https://wordpress.org/support/users/emilialaunchit/)

 *   [Profile](https://wordpress.org/support/users/emilialaunchit/)
 *   [Topics Started](https://wordpress.org/support/users/emilialaunchit/topics/)
 *   [Replies Created](https://wordpress.org/support/users/emilialaunchit/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/emilialaunchit/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/emilialaunchit/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/emilialaunchit/engagements/)
 *   [Favorites](https://wordpress.org/support/users/emilialaunchit/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Switching] Critical Error after Upgrade](https://wordpress.org/support/topic/critical-error-after-upgrade-6/)
 *  Thread Starter [emilialaunchit](https://wordpress.org/support/users/emilialaunchit/)
 * (@emilialaunchit)
 * [3 weeks, 2 days ago](https://wordpress.org/support/topic/critical-error-after-upgrade-6/#post-19015003)
 * Continued troubleshooting and found code from the prior developer, that didn’t
   update with the theme’s plugin updates and we discovered the flaw, and were able
   to fix it. Thank you. Resolved 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Switching] Critical Error after Upgrade](https://wordpress.org/support/topic/critical-error-after-upgrade-6/)
 *  Thread Starter [emilialaunchit](https://wordpress.org/support/users/emilialaunchit/)
 * (@emilialaunchit)
 * [3 weeks, 2 days ago](https://wordpress.org/support/topic/critical-error-after-upgrade-6/#post-19014983)
 * Hi John, thanks for getting back to me. I’ve obtained the PHP error log and found
   this repeated fatal error (site root shortened below):
 *     ```wp-block-code
       PHP Fatal error: Uncaught TypeError:
       user_switching::switch_back_url(): Argument #1 ($user)
       must be of type WP_User, bool given,
       called in wp-content/cache/acorn/framework/views/4518aee64706605bad1ad9628b5f89c369cef95f.php
       on line 29 and defined in
       wp-content/plugins/user-switching/user-switching.php:1029
       ```
   
 * The stack trace shows `user_switching::switch_back_url(false)` and identifies
   this theme template:
 *     ```wp-block-code
       wp-content/themes/inagrafton/resources/views/sections/header-sms.blade.php
       ```
   
 * This happens when I click “Switch To” from the Users screen. We recently migrated
   the site to WP Engine, and we don’t have access to the original theme developers.
 * Does this indicate that the theme’s custom switch-back link needs a check for
   a valid user before calling `switch_back_url()`? Any guidance on the correct 
   implementation would be appreciated. Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Switching] Critical Error after Upgrade](https://wordpress.org/support/topic/critical-error-after-upgrade-6/)
 *  Thread Starter [emilialaunchit](https://wordpress.org/support/users/emilialaunchit/)
 * (@emilialaunchit)
 * [3 weeks, 2 days ago](https://wordpress.org/support/topic/critical-error-after-upgrade-6/#post-19014966)
 * hi! The error produces a critical error on the website and the user can’t move
   forward. Does the link allow you to view it?

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