• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Addon Permissions

Matthew2D

Well-known member
#1
Hello. I am having trouble making permissions for an addon. I already made the permission but I don't know what code to add to the addon template.

Thanks in advance.
 

Jake Bunce

XenForo moderator
Staff member
#2
For example:

Code:
$visitor = XenForo_Visitor::getInstance();
$hasPerm = XenForo_Permission::hasPermission($visitor['permissions'], 'general', 'cleanSpam')

if ($hasPerm)
{
	// DO STUFF
}