WordPress.org

Ready to get started?Download WordPress

Forums

Terrified! Invisible Super Admin (14 posts)

  1. Angela
    Member
    Posted 2 years ago #

    I was removing a testing account from my network admin, and I saw that there are 3 network admins (one is me, another is the testing account I needed to remove, so that makes it 2 after the deletion).

    The problem is, I never saw that 2nd super admin. I'm a little scared because I can't find any information (from both the back-end and the usermeta table, the only user I found with administrator capability is me). I cleared my cache, but nothing.

    I have a security plugin running, but it didn't report anything suspicious. I backed up all my data just to be safe, but what do I do next?

  2. By "I never saw that 2nd super admin" do you mean to say that WP is reporting two super admins, but only listing one name?

  3. Angela
    Member
    Posted 2 years ago #

    yes

    Edit: come to think about it, i recently did lost some random data (like plugin suddenly reset itself, like a post lost, stuff).

  4. Sounds like DB corruption.

    Go optomize your DB.

  5. Angela
    Member
    Posted 2 years ago #

    optimize? what does that imply exactly?

  6. It cleans up DB caching and tidies tables. Also run a DB repair while you're in there. Both can be done via PHPmyAdmin, and they're pretty common things. I automate mt DBs to optimize regularly.

  7. Angela
    Member
    Posted 2 years ago #

    Sorry for the late reply, I haven't had time to do it. I just optimized the tables now, but the invisible admin is still there.... So what now?

  8. Do you have backups you can compare with?

  9. Angela
    Member
    Posted 2 years ago #

    Unfortunately, I only have backup for a week. Nor does my hosting company keep backup for very long either.

  10. Marion Dorsett
    Member
    Posted 2 years ago #

    I noticed this issue this morning as well. You should double check the users table in your database just to be sure, but from what I found in my install it appears to be a bug reporting the superfluous super admin.

    I just upgraded my network install this week. I have a test site setup, and there are only 5 user accounts. There were 6, but I deleted one of the test accounts.

    I noticed that I'm still showing 6 users and 2 super admins. There should be 5 users and 1 super admin. I don't know what it was before I upgraded, or before I deleted the user account.

    What I do know is that when I look at the users table I only show 5 users, and when I do a query to get the user Ids from the users meta table, I only get the 5 distinct Ids.

    So my conclusion is that it's a bug in WordPress reporting the wrong data, or we've been hacked by a hacker with some super amazing skills, but I'm betting on it being a bug ;)

  11. Angela
    Member
    Posted 2 years ago #

    Really, that's interesting... I've had to setup/destroy a few testing accounts in my WP installation and all of those went well (as in the number changed correctly). Where could've the bug be originating from?

  12. Marion Dorsett
    Member
    Posted 2 years ago #

    Ok... I just found the function call WP/Network is calling to get the super admins, and it's a zero indexed array. The dump on the result is showing me and the 0 index. There is no 0 user :)

    Array
    (
    [0] =>
    [1] => marion
    )

  13. Marion Dorsett
    Member
    Posted 2 years ago #

    After more investigation I found that the get_super_admins() function is getting cached data from the sitemeta table. The data stored for my super admins includes the zero index.

    site_admins = a:2:{i:0;N;i:1;s:6:"marion";}

    I also found a row in the sitemeta for user_count = 6... so that explains my issue. I changed the user_count to 5, and it's now showing the correct count. This explains why my numbers aren't exactly like yours.

    So the bottom line is that WordPress did a really smart thing and cached this data, but there's no check when it returns the data to the screen to remove a bogus user.

    I also noticed that there are a few keys in the sitemeta table with the suffix _ts like the user_count_ts. The value is a number, and I'm guessing this is the transient timestamp value and after enough time passes it will update the data.

  14. Carlo Rizzante
    Member
    Posted 2 years ago #

    Just to let you know, I noticed an invisible super admin as well in my network. So it might be something that happens quite regularly, possibly when an user has been deleted or its privileges modified.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.