2010-02-15, 02:34 PM
Hi, I have changed by mistake admins permissions, I unchecked that admin have access to admin panel. Now I can't access in to my admin panel . What can I do? How can I change it back?
Regards.
Regards.
UPDATE `mybb_users` SET `usergroup` = 4 WHERE `uid` = 1
(2010-02-15, 04:21 PM)virus4 Wrote: [ -> ]SQL query to the phpMyAdmin:
UPDATE `mybb_users` SET `usergroup` = 4 WHERE `uid` = 1
At the end of the query is 1 - instead of this number please enter your ID in the forum.
(2010-02-15, 04:40 PM)virus4 Wrote: [ -> ]No, this request will add you to the group of administrators. If you have concerns about the forum back up. At my request it works.
Quote:mybb_adminoptions permissions
1
a:5:{s:6:"config";a:16:{s:3:"tab";s:1:"0";s:8:"settings";s:1:"0";s:7:"banning";s:1:"0";s:14:"profile_fields";s:1:"0";s:7:"smilies";s:1:"0";s:8:"badwords";s:1:"0";s:6:"mycode";s:1:"0";s:9:"languages";s:1:"0";s:10:"post_icons";s:1:"0";s:14:"help_documents";s:1:"0";s:7:"plugins";s:1:"0";s:16:"attachment_types";s:1:"0";s:9:"mod_tools";s:1:"0";s:7:"spiders";s:1:"0";s:9:"calendars";s:1:"0";s:7:"warning";s:1:"0";}s:5:"forum";a:6:{s:3:"tab";s:1:"0";s:10:"management";s:1:"0";s:13:"announcements";s:1:"0";s:16:"moderation_queue";s:1:"0";s:11:"attachments";s:1:"0";s:7:"akismet";i:0;}s:5:"style";a:3:{s:3:"tab";s:1:"0";s:6:"themes";s:1:"0";s:9:"templates";s:1:"0";}s:5:"tools";a:13:{s:3:"tab";s:1:"0";s:13:"system_health";s:1:"0";s:5:"cache";s:1:"0";s:5:"tasks";s:1:"0";s:8:"backupdb";s:1:"0";s:10:"optimizedb";s:1:"0";s:8:"adminlog";s:1:"0";s:6:"modlog";s:1:"0";s:15:"recount_rebuild";s:1:"0";s:8:"php_info";s:1:"1";s:8:"maillogs";s:1:"0";s:10:"mailerrors";s:1:"0";s:10:"warninglog";s:1:"0";}s:4:"user";a:8:{s:3:"tab";s:1:"0";s:5:"users";s:1:"0";s:6:"groups";s:1:"0";s:6:"titles";s:1:"0";s:7:"banning";s:1:"0";s:17:"admin_permissions";s:1:"0";s:9:"mass_mail";s:1:"0";s:16:"group_promotions";s:1:"0";}}
1 a:5:{s:6:"config";a:16:{s:3:"tab";s:1:"1";s:8:"settings";s:1:"1";s:7:"banning";s:1:"1";s:14:"profile_fields";s:1:"1";s:7:"smilies";s:1:"1";s:8:"badwords";s:1:"1";s:6:"mycode";s:1:"1";s:9:"languages";s:1:"1";s:10:"post_icons";s:1:"1";s:14:"help_documents";s:1:"1";s:7:"plugins";s:1:"1";s:16:"attachment_types";s:1:"1";s:9:"mod_tools";s:1:"1";s:7:"spiders";s:1:"1";s:9:"calendars";s:1:"1";s:7:"warning";s:1:"1";}s:5:"forum";a:6:{s:3:"tab";s:1:"1";s:10:"management";s:1:"1";s:13:"announcements";s:1:"1";s:16:"moderation_queue";s:1:"1";s:11:"attachments";s:1:"1";s:7:"akismet";i:1;}s:5:"style";a:3:{s:3:"tab";s:1:"1";s:6:"themes";s:1:"1";s:9:"templates";s:1:"1";}s:5:"tools";a:13:{s:3:"tab";s:1:"1";s:13:"system_health";s:1:"1";s:5:"cache";s:1:"1";s:5:"tasks";s:1:"1";s:8:"backupdb";s:1:"1";s:10:"optimizedb";s:1:"1";s:8:"adminlog";s:1:"1";s:6:"modlog";s:1:"1";s:15:"recount_rebuild";s:1:"1";s:8:"php_info";s:1:"1";s:8:"maillogs";s:1:"1";s:10:"mailerrors";s:1:"1";s:10:"warninglog";s:1:"1";}s:4:"user";a:8:{s:3:"tab";s:1:"1";s:5:"users";s:1:"1";s:6:"groups";s:1:"1";s:6:"titles";s:1:"1";s:7:"banning";s:1:"1";s:17:"admin_permissions";s:1:"1";s:9:"mass_mail";s:1:"1";s:16:"group_promotions";s:1:"1";}}
1 a:5:{s:6:"config";a:16:{s:3:"tab";s:1:"1";s:8:"settings";s:1:"1";s:7:"banning";s:1:"1";s:14:"profile_fields";s:1:"1";s:7:"smilies";s:1:"1";s:8:"badwords";s:1:"1";s:6:"mycode";s:1:"1";s:9:"languages";s:1:"1";s:10:"post_icons";s:1:"1";s:14:"help_documents";s:1:"1";s:7:"plugins";s:1:"1";s:16:"attachment_types";s:1:"1";s:9:"mod_tools";s:1:"1";s:7:"spiders";s:1:"1";s:9:"calendars";s:1:"1";s:7:"warning";s:1:"1";}s:5:"forum";a:6:{s:3:"tab";s:1:"1";s:10:"management";s:1:"1";s:13:"announcements";s:1:"1";s:16:"moderation_queue";s:1:"1";s:11:"attachments";s:1:"1";s:7:"akismet";i:1;}s:5:"style";a:3:{s:3:"tab";s:1:"1";s:6:"themes";s:1:"1";s:9:"templates";s:1:"1";}s:5:"tools";a:13:{s:3:"tab";s:1:"1";s:13:"system_health";s:1:"1";s:5:"cache";s:1:"1";s:5:"tasks";s:1:"1";s:8:"backupdb";s:1:"1";s:10:"optimizedb";s:1:"1";s:15:"recount_rebuild";s:1:"1";s:8:"php_info";s:1:"1";s:8:"adminlog";s:1:"1";s:6:"modlog";s:1:"1";s:8:"maillogs";s:1:"1";s:10:"mailerrors";s:1:"1";s:10:"warninglog";s:1:"1";}s:4:"user";a:8:{s:3:"tab";s:1:"1";s:5:"users";s:1:"1";s:6:"groups";s:1:"1";s:6:"titles";s:1:"1";s:7:"banning";s:1:"1";s:17:"admin_permissions";s:1:"1";s:9:"mass_mail";s:1:"1";s:16:"group_promotions";s:1:"1";}}
UPDATE `mybb_usergroups` SET `cancp` = '1' WHERE `gid` = '4';
DELETE FROM `mybb_datacache` WHERE `title` = 'usergroups';
(2010-02-15, 05:43 PM)MattRogowski Wrote: [ -> ]Correct, that query isn't what you want. You're still in the admin usergroup, that group just can't access the ACP. Isn't to do with the adminoptions table either, you need to run this:
UPDATE `mybb_usergroups` SET `cancp` = '1' WHERE `gid` = '4';
This just adds ACP permission back to the admin group. Then you need this:
DELETE FROM `mybb_datacache` WHERE `title` = 'usergroups';
Basically the usergroup settings are cached, so even though the database says the admin group has ACP permission, the cache still says it doesn't, so it needs to be deleted. Now you'll be able to get into the ACP, because it'll see there's no usergroups cache so it'll select data from the database, thus using the new updated data, but you need to go to ACP > Tools & Maintenance > Cache Manager > usergroups > Rebuild Cache to make sure it's all cached OK again.