Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Front End User Login Enhanced Plugin (XML only)
#36
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.
Reply


Messages In This Thread
RE: Front End User Login Enhanced Plugin (XML only) - by ds10 - 2015-02-19, 18:43:48



Users browsing this thread: 7 Guest(s)