• Hi there,

    when working with your plugins I found a ‘bug’ in the protect-admin class.
    In the function exclude_administrators() it searches for ‘%administrator%’ in the usermeta capabilities. Since I have a custom role called ‘site_administrator’, it also hides those users.
    If you change ‘%administrator%’ to ‘%”administrator”%’ (with the double quotes), it works in the correct way.
    As far as I know this should be possible to use, since the role is in the database with “” around it because of the serialize.

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

    (@shinephp)

    Hi,

    You are correct. Thank you for the suggestion. I will include this fix into the next update.

    I have knew about a problem with roles containing ‘administrator’ inside ID. And I wonder how I missed this simple fix for years.

    Thread Starter jillebehm

    (@jillebehm)

    Hi Vladimir,

    great! Glad I could be of assistance ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Protect admin ‘bug’’ is closed to new replies.