function jammer_matchRoles in Jammer 1.0.x
1 call to jammer_matchRoles()
File
- ./
jammer.module, line 21 - General functions and hook implementations.
Code
function jammer_matchRoles($roles, $entry) {
$inList = FALSE;
foreach ($roles as $role) {
if (in_array($role, $entry['roles'])) {
$inList = TRUE;
break;
}
}
// return depending on 'invert' field
if ($entry['invert']) {
return !$inList;
}
else {
return $inList;
}
}