MyBB Community Forums

Full Version: Locked myself out
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is as stupid as locking yourself out of your house. But yes, it happens.

So I changed some groups, added a new group for people with more than 300 posts, and for some unexplainable reason that group suddenly had admin rights. (Eventhough I copied the normal user rights). It gets worse...

I noticed the admin rights, went to that new group I made and made it so people couldnt access the Admin CP.

And this is were it got worse. Apparantly I suddenly was a part of that group, since I had more than 300 posts. It just ditched my admin rights.

So I googled and found out what to change in the PHPmyadmin, users, my name, change the group id to 4.
But its already on 4. So changed it to 3 (supermoderators), still cant log in.

What the hell?
So basicly I still do have the rights, but because I am in that group it bypasses my rights?

I'd appreciate any quick reply on this...
In phpmyadmin, check what your "additional groups" are set to for your account. For sake of logging back in, I would get rid of anything that might be in that field and set your usergroup to 4.
It is/was empty, my usergroup was already set to 4. It just doesnt show the Admin cp login option in my control panel.
Can you go directly to the admin login via the link? Does it give you a permissions error when you try to log in?

If so, then you'll need to edit the admin usergroup through phpmyadmin and make sure that it is set to have access to the ACP.

Edit: I believe the field is cancp in mybb_groups
Run these two queries in phpMyAdmin and try..

UPDATE `mybb_usergroups` SET `cancp` = '1' WHERE `gid` = '4'

DELETE FROM `mybb_datacache` WHERE `title` = 'usergroups'
(2014-07-15, 04:48 PM)jshort Wrote: [ -> ]Can you go directly to the admin login via the link? Does it give you a permissions error when you try to log in?

If so, then you'll need to edit the admin usergroup through phpmyadmin and make sure that it is set to have access to the ACP.

Edit: I believe the field is cancp in mybb_groups

It doesnt show the link to the admin cp on my profile anymore, if I go the admin cp (through a bookmark) it gives me the login but when I try to login, it just refreshes.

(2014-07-15, 04:51 PM)mmadhankumar Wrote: [ -> ]Run these two queries in phpMyAdmin and try..

UPDATE `mybb_usergroups` SET `cancp` = '1' WHERE `gid` = '4'

DELETE FROM `mybb_datacache` WHERE `title` = 'usergroups'

I ran the first one, nothing changed..
That second query? Delete usergroups? Are we sure? Undecided

Ok, so , I changed myself to usergroup 4 and no additional groups, I made sure Admin group has usecp on 1, and still theres no change. In fact, nothing seems to change. I made a typo in a usertitle through the PHPmyadmin and it doesnt even display the typo.

*Edit*
i'm starting to think that all those commands are kind of stuck, none of the changes I make are doing anything. Is there a way to 'reboot' the db?

(2014-07-15, 04:51 PM)mmadhankumar Wrote: [ -> ]Run these two queries in phpMyAdmin and try..

UPDATE `mybb_usergroups` SET `cancp` = '1' WHERE `gid` = '4'

DELETE FROM `mybb_datacache` WHERE `title` = 'usergroups'

That worked! I only now saw it was 'cache' and not normal db lol.. I guess the cache needed a flush.

Thanks man.
The way MyBB works it prefers to load a cache for permissions to save database queries. This is why you can't just edit the mybb_usergroups table without either updating the cache by making a file that does this or by deleting the data from the mybb_datacache table.