Support » Fixing WordPress » is_super_admin returs a 500 Internal Server Error

  • Hi,

    I am working on a plugin and i want some sections of the plugin to only be loaded if the user is superadmin.

    When i use the following in my plugin:

    if ( is_super_admin() ) {
    // Some code only for superadmins.
    }

    I get the following error:

    [Fri Oct 19 13:58:11 2012] [error] [client x.x.x.x] PHP Fatal error: Call to undefined function wp_get_current_user() in /var/www/vhosts/xxxxxx.com/httpdocs/wp-includes/capabilities.php on line 1373

    Any idea why i get this error and how to solv it?

  • The topic ‘is_super_admin returs a 500 Internal Server Error’ is closed to new replies.