MyBB Community Forums

Full Version: Remake permissions?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im currently building some plugins for MyBB, and have got into one issue.

When installed, the permission is set for the user group to access this new page, but its not working on I re-save any user group permission.
Could it be that I'm missing a function to remake permissions in the plugin installation?
So you set the groups that are allowed on the page in the plugin settings, but when you re-save those settings the groups can no longer access the page? If you aren't already, try using groupselect optionscode (https://docs.mybb.com/1.8/development/plugins/basics/) when creating your plugin settings and use is_member function (https://github.com/mybb/mybb/blob/featur....php#L7343). if that doesn't work, feel free to post your code for someone to take a look at it.
Add after plugin user group permission changes:
$cache->update_usergroups();

Don't forget to global $cache in plugin function.
There are multiple ways to add permission checking to a plugin, so it could increase your chances of getting the proper help if you go on deeper about describing your issue with, for example, some code snips.