public function getAllUsers($withAdmin = false)
    {
        $query = $this->userModel->query()
            ->orderBy('email');

        if ( ! $withAdmin) {
            $query->where('is_superadmin', false);
        }

        return $query->get();
    }
public function getAllUsers($withAdmin = false)
    {
        $query = $this->userModel->query()
            ->orderBy('email');

        if ( ! $withAdmin) {
            $query->where('is_superadmin', false);
        }

        return $query->get();
    }
public function getAllUsers ( $ withAdmin = false ) { $ query = $ this -> userModel -> query ( ) -> orderBy ( 'email' ) ; if ( ! $ withAdmin ) { $ query -> where ( 'is_superadmin' , false ) ; } return $ query -> get ( ) ; }
Returns all CMS users.

@param bool $withAdmin include superadmins
@return array|Collection|UserInterface[]
Returns all CMS users .