This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

Sometime it is needed to hide the Super user from user list. Here is the process.

Create a page called user_list.php on your site roots model folder. The put the below code:

<?php defined('C5_EXECUTE') or die("Access Denied."); 

class UserList extends Concrete5_Model_UserList {

    protected function createQuery(){
        if(!$this->queryCreated){
            $this->setBaseQuery();
            $this->filter('u.uID', '1','!=');
            if(!isset($this->showInactiveUsers)) $this->filter('u.uIsActive', 1);
            if(!$this->showInvalidatedUsers) $this->filter('u.uIsValidated', 0, '!=');
            $this->setupAttributeFilters("left join UserSearchIndexAttributes on (UserSearchIndexAttributes.uID = u.uID)");
            $this->queryCreated=1;
        }
    }
}
Loading Conversation