• Hi!
    All of a sudden, I could not use the WP dashboard. It said I had no privileges. So I checked database in PHPMyAdmin and see that my user (only admin in the site) had his wp_user_role set to 0.

    Since I have a staging site, I could double-check that, and everything was fine in the staging dB.
    I asked in the “Ultimate member” support forum, because I suspect that could be the culprit. But I’m not 100% sure.

    So my question is, have anyone experienced something similar? I was dead worried the issue was virus or hacking related. I believe I can rule that option off, but nevertheless, I still on the hunt for the reason behind this event, so I can avoid it in the future.

    Thanks!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I think you mean “wp_user_level”? ??
    It sounds like you resolved that aspect already, but for anyone else landing here by search, you can set it to 10 (for admin users) via the phpMyAdmin app (in wp_usermeta table). And the wp_capabilities value can be set to a:1:{s:13:"administrator";b:1;}. Note that these are the default administrator values. Specific site admins could be assigned other values.

    To answer your specific question, this particular problem I have not seen. However, I’ve seen other DB values inexplicably changed in a similar manner. Certainly hacker code could possibly be the cause, but it’s not limited to that. If there are no other signs of a hack, the cause is likely errant code from your theme or a plugin. The culprit module could otherwise behave as expected. Only when you do a very specific action might the problem arise.

    To prevent such a thing from happening again, you need to identify precisely what action caused it in the first place. Once known, the best course of action is to get the errant code corrected.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_user_role of Admin changed to 0’ is closed to new replies.