2015-02-19, 18:43:48
PHP Code:
<?php
$currentUserGroups = getCurrentUserGroups();
foreach($currentUserGroups as $userGroup) {
if($userGroup == 'GroupA') {
?>Group A Content<?php
}
elseif($userGroup == 'GroupB') {
?>Group B Content<?php
}
elseif($userGroup == 'GroupC') {
?>Group C Content<?php
}
elseif($userGroup == 'Unauthorized') {
?>Default Content<?php
}
}
?>
That will only work correct if you restrict every user to one group. If you have more than one group for a user, the user will see the content of all groups in which the user is a member.