G Gunny Member May 31, 2022 #1 Can a conditional statement be made to check both primary and secondary user groups to limit access to content Code: if( $user->isMemberOf($userGroupId) AND ( $user->isMemberOf($userGroupId)
Can a conditional statement be made to check both primary and secondary user groups to limit access to content Code: if( $user->isMemberOf($userGroupId) AND ( $user->isMemberOf($userGroupId)
P Paul B XenForo moderator Staff member May 31, 2022 #2 Yes, conditional statements support logical operators. OR / || - used to link alternative conditions AND / && - used to link additional conditions ! - place before a condition to invert it XOR - returns true if only one of two conditions is true
Yes, conditional statements support logical operators. OR / || - used to link alternative conditions AND / && - used to link additional conditions ! - place before a condition to invert it XOR - returns true if only one of two conditions is true