MyBB Community Forums

Full Version: Revoked Admin Permissions from Administrator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I was attempting to remove permissions from my user account itself and use the appropriate permission for my rank and it appears I have 'removed permissions from Administrator'. To be perfectly honest I have no clue how I've done this but even people with higher ranks then me cannot access AdminCP to revert this. I have been searching around frantically for the past hour trying to find a solution and I nearly did, but it appears the MySQL Query I found to execute is old (it was from 2007 but was worth a shot).

So I have come here to see if anyone knows what the code is I need to execute through phpmyadmin and/or if that is still possible. The usergroup ID is 2 I'm fairly certain by default.

Thank you!
It would help to know which code you tried and what the result was so that we don't suggest the same thing over again.

Is that account of yours the super admin (UID 1) ?

This is what I tried.
INSERT INTO mybb_adminoptions (uid, cpstyle, notes, permsset, caneditsettings, caneditann, caneditforums, canmodposts, caneditsmilies, caneditpicons, caneditthemes, canedittemps, caneditusers, caneditpfields, caneditugroups, caneditaperms, caneditutitles, caneditattach, canedithelp, caneditlangs, canrunmaint, canrundbtools) VALUES
(164, '', '', 1, 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes');

And no my user is not userid 1

Does this mean the owner of the forums with the userid 1 will still have access?
User ID 1 should have access; your above code affects user ID 164  (is that what you wanted?)

What you need to do is edit the User that lost access in the Database and make sure that user is member of the admin usergroup: default group id=4

UPDATE `mybb_users` SET usergroup=4 WHERE uid=164;
(replace 164 with the user ID you want to affect)

Wait a minute .... did you try to change user group permissions ?
Okay thank you so much.

No user 164 isn't the ID I wanted that's just the example I found and changed it to suit the Userid. As long as the Owner (User 1) has access to everything still they can fix it when they get home.

Thank you for your help, I was stressing so much over this.

If the superadmin (uid 1) cannot access the Admin CP either, you'll have to change the group permissions for the admin group in the "mybb_usergroups" table. (set "cancp=1" for the group).

The "mybb_adminoptions" table structure changed, and the individual permissions are stored in one array not in all the table fields listed in your code example above.
All is fixed.

Thank you