MyBB Community Forums

Full Version: admin permissions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 Sad . What can I do? How can I change it back?

Regards.
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: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.

I didn't change my usergroup, I just removed that admins can use admin panel Sad I removed the privileges.
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.
(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.

You've just said that it will add me to the group of administrations, and I've told you that I changed that the group called Administrators can not use Admin Control Panel. So the SQL code that you gave will just change my group to Administrators, but I'm already in Administrations group. This SQL code doesn't work for me. I created my forum today so I didn't do any backups.Anyone knows how to fix it? I think that it has something to do with this:
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";}}
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.
(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.

Thaaank youuu! Blush