Skip to content

Instantly share code, notes, and snippets.

@ideesimple
Forked from rtripault/UserGroups.php
Created February 14, 2011 11:16
Show Gist options
  • Save ideesimple/825742 to your computer and use it in GitHub Desktop.
Save ideesimple/825742 to your computer and use it in GitHub Desktop.
<?php
/* UserGroups snippet*/
$user =& $modx->user;
if ($user->isMember('membres') {
$output = $modx->getChunk('membres');
} elseif ($user->isMember('administrateurs') {
$output = $modx->getChunk('administrateurs');
} elseif ($user->isMember('employés') {
$output = $modx->getChunk('employés');
} else {
$output = $modx->getChunk('offline');
}
return $output;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment