• In WP multisite as network admin, I was unable to export the plugin settings from /wp-admin/network/admin.php?page=gd-security-headers-tools&panel=export with this showing in the logs:

    GET /wp-admin/network/admin.php?page=gd-security-headers-tools&gdsih_handler=getback&run=export&_ajax_nonce=afcd44fb9f HTTP/1.1" 500

    The problem is in d4plib\d4p.wp.php ~line 139: The access check fails even though I am network admin. I suggest this function needs to check for is_super_admin():

    if (!function_exists('d4p_is_current_user_admin')) {
        function d4p_is_current_user_admin() {
            return d4p_is_current_user_roles('administrator');
        }
    }

    E.g.

    if (!function_exists('d4p_is_current_user_admin')) {
        function d4p_is_current_user_admin() {
            return d4p_is_current_user_roles('administrator') || is_super_admin();
        }
    }
  • The topic ‘Network admin role not recognized’ is closed to new replies.