Skip to content

Instantly share code, notes, and snippets.

@rtripault
Created February 10, 2011 23:36
Show Gist options
  • Save rtripault/821618 to your computer and use it in GitHub Desktop.
Save rtripault/821618 to your computer and use it in GitHub Desktop.
UserGroups snippet for MODX Revolution (source: http://modxcms.com/forums/index.php/topic,60635.msg346266.html#msg346266)
<?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