MyBB Community Forums

Full Version: Should we add a hook here?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Many plugins need or want to interpret "0" as "unlimited" when checking for an user's permissions, but the way MyBB currently handles permissions doesn't let third party developers add their settings to the $groupzerogreater array and prevent MyBB from adding a non-zero value into their settings (maybe if the user is engaged in multiple usergroups and one of these has a non-zero value set for it).

Should we add an extra hook in the usergroup_permissions() function (where it is primarily and uniquely used I suppose)? The plugin object seems to be already initialized at that point.
I don't see why not.
Unlimited should be -1, not 0, in the MyBB permissions array.

And this discussion should be outside of the staff forums. Moving.