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

Restrict Content To Certain Groups

Xarcell

Well-known member
#1
I'm trying to figure out a way to restrict content to certain multiple groups.

I found this topic that restricts content to a group, but not multiple groups. This is something that is essential for my site.

Any help?
 

Xarcell

Well-known member
#4
I thought I'd try this:
Code:
<xen:if is="!{xen:helper checkusergroup, $visitor, 1, 11, 12, 13, 14, 15}">
    // User who does NOT belong to any of the listed usergroups
</xen:if>
Is supposed to work for those who are NOT in those groups listed. But it didn't seem to work.
 

Xarcell

Well-known member
#6
actually, I found that post through search. After backing up to the beginning, I realized that it is a add-on. So now I'm attempting to install the add-on in beta 5. having issues with that too, but let me try a few things and I'll get back to ya.
 
R

ragtek

Guest
#8
Does the helper function support arrays?
No:(

PHP:
/**
	 * Determines if a user is a member of a particular user group
	 *
	 * @param array $user
	 * @param integer $userGroupId
	 * @param boolean Also check secondary groups
	 *
	 * @return boolean
	 */
	public function isMemberOfUserGroup(array $user, $userGroupId, $includeSecondaryGroups = true)