pepebe
2/7/2012 - 12:26 PM

MODX: change the contents of a page based on a group of users

MODX: change the contents of a page based on a group of users

by http://forums.modx.com/u/BobRay

<?php
/* InGroup snippet */
$output = "";
if ($modx->user->isMember('groupA')) {
    $output = $modx->getChunk('chunk1');
} else if ($modx->user->isMember('GroupB')) {
    $output = $modx->getChunk('chunk2');
} else {
    $output = $modx->getChunk('chunk3');
}
return $output;