• Resolved dzarelli

    (@dzarelli)


    Since we’ve activated the User Role Editor plugin in our multi-site environment (at the request of users), administrators of any given blog site on our instance cannot assign admin permissions to others. How to I allow, by default, administrators to grant administrator permissions to others? This has become a huge headache since I have over 200 blogs with 11,0000 + users and everyone is freaking out since they can’t grant admin permissions.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter dzarelli

    (@dzarelli)

    Thanks. I didn’t see that the quotes in my php file were different. I did a direct copy/paste of the code you provided, so I’m not sure how the wrong characters got in there.

    I went ahead and created ure-suppress-admin-protection.php in my wordpress wp-content/mu-plugins folder using the code below (copied from the file itself):

    <?php
     add_filter('ure_supress_administrators_protection', 'switch_off_ure_administrators_protection', 10, 1);
     function switch_off_ure_administrators_protection($supress_protection) {
     
    $supress_protection = true;
     
    return $supress_protection;
     }

    I’m not sure what I’m still doing wrong here, but if I create the file and use the above code in it, the blog still throws a 500 error.

    Any idea why it’s still throwing a 500 error after replacing the quotes? Where are the logs located?

    Plugin Author Vladimir Garagulya

    (@shinephp)

    To be sure that you really put to your site a working version with correct code try to download .php file from this resource. And copy to your site exactly .php file from this archive (via FTP) without copy/paste stage, where as I suppose some auto-replacement takes place.

    Systems log files with related information for Linux/Ubuntu like system are:
    – /var/log/syslog
    – /var/log/apache2/error.log

    It’s possible to get PHP error messages file inside your WordPress site folder setting WP debugging constants. Read this article.

    Thread Starter dzarelli

    (@dzarelli)

    Thanks for the reply. I copied (verified) and uploaded the file you provided to my wp-content folder (/data/wordpress/wp-content/mu-plugins) and restarted IIS. I am still getting a 500 error whenever this file exists in the mu-content folder. I have no system logs in /var/log (there is no “syslog” or “apache2” folder there), however I enabled debugging as you suggested and noticed the following fatal error for PHP:
    [12-Jul-2018 16:04:32 UTC] PHP Fatal error: Cannot redeclare switch_off_ure_administrators_protection() (previously declared in /data/wordpress/wp-content/mu-plugins/ure-supress-admin-protect.php:4) in /data/wordpress/wp-content/themes/platformpro/functions.php on line 20

    This appeared to be a conflict between the settings defined in the php file we uploaded and the code we previously applied to the “platform pro” theme. Once I removed the code from the platform pro theme I was able to upload the php file to “mu-plugins” folder, restarted IIS, and the site(s) now render. We are testing the permissions no to ensure that admins can now grant admin rights to others. I will reply back once this functionality has been confirmed. Thanks.

    Thread Starter dzarelli

    (@dzarelli)

    Confirmed – Removing the code from the platform pro theme fixed the issue. Thanks for all the assistance. It is appreciated.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘How to allow admins to grant admin permissions to others’ is closed to new replies.