• Resolved robinleung

    (@robinleung)


    Using this with a multisite, for some odd reason individual site admin are unable to add administrator role nor does the administrator role exist. Only super admin is able to see/add admin role.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Go to the Network Admin->Options->User Role Editor->General and turn ON “Show ‘Administrator’ role” checkbox.
    URE protects by default ‘administrator’ role and users with ‘administrator’ role from each other.

    Thread Starter robinleung

    (@robinleung)

    I have this turned on. And still no admin role shows up.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Thanks. You are right. I re-viewed the code and confirm:
    ‘administrator’ role is protected by default from single site administrators under WP multisite and this protection is not switched off by checkbox at the URE Settings, as it works for the single site installation.

    You may switch ‘administrator’ role protection using custom filter ‘ure_supress_administrators_protection’, just return TRUE from it, like here:

    
    add_filter( 'ure_supress_administrators_protection', 'ure_supress_admin_protection', 10, 1);
    function ure_supress_admin_protection( $supress ) {
      return true;
    }
    
    Thread Starter robinleung

    (@robinleung)

    Thanks! Dumb question, does the filter go in the user-role-editor.php file?

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Filter code should go to the active theme functions.php file or you may add it as as a separate .php file to the wp-content/mu-plugins/ folder as a Must Use plugin.

    Thread Starter robinleung

    (@robinleung)

    This has been tremendously helpful. Thanks Vladimir.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Administrator role missing’ is closed to new replies.