returns all sulu system users
@return array
483419
public function getSystemUserArray()
    {
        $repo = $this->get('sulu_security.user_repository');
        $users = $repo->getUserInSystem();
        $contacts = [];

        foreach ($users as $user) {
            $contact = $user->getContact();
            $contacts[] = array(
                'id' => $contact->getId(),
                'fullName' => $contact->getFullName()
            );
        }
        return $contacts;
    }
236856
public function members() : array
    {
        $members = [];

        if (!isset($this->session->members) || $this->session->memberCount <= 0) return $members;

        foreach ($this->session->members as $member) {
            $members[] = new User($this->client, $member->onlineId);
        }

        return $members;
    }
1263625
public function getGroups()
    {
        $data  = $this->getData();
        $groups = KObjectConfig::unbox($data->groups);

        if(empty($groups)) {
            $this->getSession()->set('user.groups', JAccess::getGroupsByUser($this->getId()));
        }

        return parent::getGroups();
    }
1331847
public function getAdminCanditates()
    {
        $viewer = get_viewer();
        $query = $this->getService('repos:people.person')->getQuery();

        //super admin can make anyone admin
        if (!$viewer->admin()) {
            $ids = $this->_mixer->followerIds->toArray();
            $ids = array_merge($ids, $viewer->followerIds->toArray());
            $query->id($ids)->id($viewer->id, '<>')->id($this->administratorIds->toArray(), '<>');
        }

        return $query->toEntitySet();
    }
243350
public function getWrongEmailUsers()
    {
        if (version_compare($this->appbox->get_version(), '3.9', '>=')) {
            return [];
        }

        $builder = $this->appbox->get_connection()->createQueryBuilder();
        /** @var Statement $stmt */
        $stmt = $builder
            ->select('u.usr_mail', 'u.usr_id', 'u.last_conn', 'u.usr_login')
            ->from($this->table, 'u')
            ->where($builder->expr()->isNotNull('u.usr_mail'))
            ->execute()
        ;
        $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
        $stmt->closeCursor();

        $users = [];

        foreach ($rs as $row) {
            if (!isset($users[$row['usr_mail']])) {
                $users[$row['usr_mail']] = [];
            }

            $users[$row['usr_mail']][] = $row;
        }

        $badUsers = [];

        foreach ($users as $email => $usrs) {
            if (count($usrs) > 1) {
                $badUsers[$email] = [];
                foreach ($usrs as $usrInfo) {
                    $badUsers[$email][$usrInfo['usr_id']] = $usrInfo;
                }
            }
        }

        unset($users);

        return $badUsers;
    }
339053
public function getCounts()
    {
        $log = AccessLog::all()->groupBy('user_id');

        $counts = [];
        $all = 0;
        foreach ($log as $l) {
            $first = $l[0];
            $user = $first->user ? $first->user : $this->getDeletedFakeUser();
            $size = sizeof($l);
            $counts[] = [
                'size' => $size,
                'id' => $first->user_id,
                'name' => $user->username
            ];
            $all += $size;
        }

        return [
            'all' => $all,
            'counts' => $counts
        ];
    }
62395
private function getAllPermissions()
    {
        $user = auth()->user();

        if( $user->hasRole('admin') ) {
            $permissions = Permissions::select('id', 'name', 'action', 'created_at')->where('name', '!=', 'admin.acl.roles')->get();
        } elseif( $user->isSuperAdmin() ) {
            $permissions = Permissions::select('id', 'name', 'action', 'created_at')->get();
        } else {
            $permissions = collect([]);
        }

        $permissions = $permissions->sortBy('name')->groupBy('name');

        return json_encode($permissions);
    }
1330664
public function getAllUsers() : array {
		$result = $this->db->query("SELECT id FROM accounts;");
		$users = [];
		foreach ($result->fetch_all(MYSQLI_ASSOC) as $user) {
			$users[(int)$user["id"]] = $this->getUserFromId((int)$user["id"]);
		}
		return $users;
	}
824686
public function all()
    {
        if ( $this->subject == 'user' ) {
            return $this->getUserPermissions( $this->user );
        } elseif ( $this->subject == 'role' ) {
            return $this->getRolePermissions( $this->role );
        }
    }
1048799
def list_users(root=None):
    '''
    
    '''
    if root is not None and __grains__['kernel'] != 'AIX':
        getpwall = functools.partial(_getpwall, root=root)
    else:
        getpwall = functools.partial(pwd.getpwall)

    return sorted([user.pw_name for user in getpwall()])
968072
public function getUsers() {
	
		$this->db->setQuery('SELECT * FROM `users` WHERE group_id=?');
		$list = $this->db->loadObjectList($this->id);
	
		$users = array();
	
		$userClass = PAIR_USER_CLASS;
	
		// iterate on each page
		foreach ($list as $row) {
			$users[] = new $userClass($row);
		}
	
		return $users;
	
	}
150162
public function all()
    {
        $endpoint = '/admin/users.json';
        $response = $this->request($endpoint);
        return $this->createCollection(User::class, $response['users']);
    }
898127
public function getUsersHavingSuperUserAccess()
    {
        $db = $this->getDb();
        $users = $db->fetchAll("SELECT login, email, token_auth, superuser_access
                                FROM " . Common::prefixTable("user") . "
                                WHERE superuser_access = 1
                                ORDER BY date_registered ASC");

        return $users;
    }
1029553
public function findAll()
    {
        $virtualHostNodes = array();
        foreach ($this->getSystemConfiguration()->getContainers() as $containerNodes) {
            foreach ($containerNodes->getServers() as $serverNode) {
                foreach ($serverNode->getVirtualHosts() as $virtualHostNode) {
                    $virtualHostNodes[$virtualHostNode->getPrimaryKey()] = $virtualHostNode;
                }
            }
        }
        return $virtualHostNodes;
    }
136912
public function getUserWorkstations()
    {
        $workstations = $this->getFirstAttribute($this->schema->userWorkstations());

        return array_filter(explode(',', $workstations));
    }
983674
public function findUserBySystem($system)
    {
        $queryBuilder = $this->createQueryBuilder('user')
            ->select('user', 'contact')
            ->leftJoin('user.userRoles', 'userRoles')
            ->leftJoin('user.contact', 'contact')
            ->leftJoin('userRoles.role', 'role')
            ->where('role.system = :system');

        $query = $queryBuilder->getQuery();
        $query->setParameter('system', $system);

        return $query->getResult();
    }
1280778
public function getAllUsers($options = [], $filters = [GenerisRdf::PROPERTY_USER_LOGIN => '*'])
    {
        $userClass = new core_kernel_classes_Class(TaoOntology::CLASS_URI_TAO_USER);
		$options = array_merge(['recursive' => true, 'like' => true], $options);

		return (array) $userClass->searchInstances($filters, $options);
    }