PDA

View Full Version : Disabling mod per usergroup


Broseph
02-19-2013, 06:12 AM
In my experience this is easily accomplished with a setting in admincp, and a conditional on every hook checking to see if the current user is in the appropriate usergroup. However, ideally, I'd like to turn this off centrally for the user's entire session. In other words, is there a way to disable a product as you would from the product manager, without having to wrap every single hook in a conditional?

kh99
02-19-2013, 01:40 PM
No, because the way the hooks work is that all the code to be executed on any given hook (from all active products) is built into one piece of code ahead of time. When you disable a product, the code for each hook is rebuilt to include only the active products.

Broseph
02-19-2013, 07:19 PM
Understood, thanks.