Hello,
I use MemberCheck snippet in a chunk as it’s shown here:
View at EasyCaptures.com
It returns &default chunk instead of &chunk chunk (private one).
Here’s a fragment of problematic code (modified):
$check = $this->modx->isMemberOfWebGroup(array ('SuperadminsUG')); // <-- this returns FALSE
// $check = $this->modx->isMemberOfWebGroup($groups);
$o .= 'check = '.$check.' '; // DEBUG <-- FALSE
$o .= 'userlogedin = '. $this->modx->user->username .' '; // DEBUG <-- returns 'superadmin'
$chunkcheck = $this->modx->getChunk($chunk);
$defaultcheck = $this->modx->getChunk($this->config['default']);
As I checked: when isMemberOfWebGroup function is invoked, $_SESSION[’webUserGroupNames’] is undefined and that causes function to return ’false’;