public function getUsers()
    {
        if (!empty($this->users)) {
            return $this->users;
        }

        try {
            if (!$tempusers = $this->getRepository()->getUsers()) {
                return [];
            }

            /** @var \Bolt\Storage\Entity\Users $userEntity */
            foreach ($tempusers as $userEntity) {
                $id = $userEntity->getId();
                $this->users[$id] = $userEntity->toArray();
            }
        } catch (TableNotFoundException $e) {
            return [];
        }

        return $this->users;
    }
public function getUsers()
    {
        if (!empty($this->users)) {
            return $this->users;
        }

        try {
            if (!$tempusers = $this->getRepository()->getUsers()) {
                return [];
            }

            /** @var \Bolt\Storage\Entity\Users $userEntity */
            foreach ($tempusers as $userEntity) {
                $id = $userEntity->getId();
                $this->users[$id] = $userEntity->toArray();
            }
        } catch (TableNotFoundException $e) {
            return [];
        }

        return $this->users;
    }
public function getUsers ( ) { if ( ! empty ( $ this -> users ) ) { return $ this -> users ; } try { if ( ! $ tempusers = $ this -> getRepository ( ) -> getUsers ( ) ) { return [ ] ; } /** @var \Bolt\Storage\Entity\Users $userEntity */ foreach ( $ tempusers as $ userEntity ) { $ id = $ userEntity -> getId ( ) ; $ this -> users [ $ id ] = $ userEntity -> toArray ( ) ; } } catch ( TableNotFoundException $ e ) { return [ ] ; } return $ this -> users ; }
Get an array with the current users.

@return array[]
Get an array with the current users .