Get all the system users.
public getUsers ( ) : Bolt\Storage\Entity\Users[] | false | ||
return | Bolt\Storage\Entity\Users[] | false |
/** * Get an array with the current users. * * @return array[] */ public function getUsers() { if (!empty($this->users)) { return $this->users; } try { if (!($tempusers = $this->repository->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; }