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

Addon Permissions

Discussion in 'XenForo Development Discussions' started by Matthew2D, Jul 7, 2012.

  1. Matthew2D

    Matthew2D Well-Known Member

    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.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    For example:

    $visitor = XenForo_Visitor::getInstance();
    $hasPerm = XenForo_Permission::hasPermission($visitor['permissions'], 'general', 'cleanSpam')
    if ($hasPerm)
    	// DO STUFF
    bousaid likes this.
  3. ragtek

    ragtek Guest

Share This Page