Title: Handle unavailable PHP function get_current_user()
Last modified: August 27, 2023

---

# Handle unavailable PHP function get_current_user()

 *  Resolved [ctomczyk](https://wordpress.org/support/users/ctomczyk/)
 * (@ctomczyk)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/handle-unavailable-php-function-get_current_user/)
 * Hello.
 * Sometimes the PHP function `get_current_user()` may not be available (mostly 
   disabled, hence unavailable, e.g. on Kinsta hosting), and while activating the
   plugin, the code throws an exception that is not visible to the user.
 * It would be good to check first if `get_current_user()` is available and displays
   the error message instead of silently throwing the exception and blocking the
   whole WordPress. To resolve it, the user must manually remove the plugin from
   the server, which may not always be possible.
 * Hope this helps to improve the user experience.

Viewing 1 replies (of 1 total)

 *  Plugin Author [fpuenteonline](https://wordpress.org/support/users/fpuenteonline/)
 * (@fpuenteonline)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/handle-unavailable-php-function-get_current_user/#post-17053169)
 * Hello [@ctomczyk](https://wordpress.org/support/users/ctomczyk/)
 * Thanks for your comment. I will release a new version asap including your feedback.
 * Best

Viewing 1 replies (of 1 total)

The topic ‘Handle unavailable PHP function get_current_user()’ is closed to new 
replies.

 * ![](https://ps.w.org/object-cache-4-everyone/assets/icon-256x256.png?rev=2306156)
 * [Object Cache 4 everyone](https://wordpress.org/plugins/object-cache-4-everyone/)
 * [Support Threads](https://wordpress.org/support/plugin/object-cache-4-everyone/)
 * [Active Topics](https://wordpress.org/support/plugin/object-cache-4-everyone/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-cache-4-everyone/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-cache-4-everyone/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [fpuenteonline](https://wordpress.org/support/users/fpuenteonline/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/handle-unavailable-php-function-get_current_user/#post-17053169)
 * Status: resolved