Change WordPress user roles and capabilities Forums Bug Reports Fatal error: Uncaught Error: Call to a member function has_cap() Reply To: Fatal error: Uncaught Error: Call to a member function has_cap()

#4174
Vladimir
Keymaster

Thanks for your messages.

I use WordPress global $current_user often at User Role Editor.
It’s the 1st message for years about such kind of PHP fatal error. I wonder, why this global variable $current_user is not initialized at your WP installation? Some code removes its value especially or custom authorization process is realized, which does not initialize $current_user for some reason the same way as WordPress does?