Grabbing a user_group in MODx

Currently I have a Client login area. In this login area I was going to create a snippet that shows certain information for 'Admin' users.

I had a feeling I could use

<?php
if ($modx->getLoginUserType()) {
   echo 'hi';
} else {}
?>

However, all User Types are web.

I was also looking around and found a script that prints out web-users of a web-group: http://modxcms.com/forums/index.php/topic,43139.0.html

Any Advice?

Answers


$test = $modx->isMemberOfWebGroup( array(
    'Editors'
));
if ($test === true) {
    // Is a member of the group
} else {
    // Is not a member of the group
}

see: http://wiki.modxcms.com/index.php/API:isMemberOfWebGroup


Need Your Help

In R, is there an algorithm to create approximately equal sized clusters

r cluster-analysis

There seems to be a lot of information about creating either hierarchical or k-means clusters. But I would like to know if there is an solution in R that would create K clusters of approximately e...

On Network call response data stores successfully but not present while reading. Using SnappyDb for storing the data.

android database android-volley snappydb

I am making a network call through volley. On Response success I am trying to store data through SnappyDb which shows that it has stored successfully. But while reading any data is not present. But...