getUsers() public method

Retrieves a list of all existing users
public getUsers ( ) : array
return array
 /**
  * List all users
  *
  * This command lists all existing Neos users.
  *
  * @return void
  */
 public function listCommand()
 {
     $users = $this->userService->getUsers();
     $tableRows = array();
     $headerRow = array('Name', 'Email', 'Account(s)', 'Role(s)', 'Active');
     foreach ($users as $user) {
         $tableRows[] = $this->getTableRowForUser($user);
     }
     $this->output->outputTable($tableRows, $headerRow);
 }
Esempio n. 2
0
 /**
  * Creates an array of user names and their respective labels which are possible owners for a workspace.
  *
  * @return array
  */
 protected function prepareOwnerOptions()
 {
     $ownerOptions = ['' => '-'];
     foreach ($this->userService->getUsers() as $user) {
         /** @var User $user */
         $ownerOptions[$this->persistenceManager->getIdentifierByObject($user)] = $user->getLabel();
     }
     return $ownerOptions;
 }
 /**
  * Shows a list of all users
  *
  * @return void
  */
 public function indexAction()
 {
     $this->view->assignMultiple(array('currentUser' => $this->currentUser, 'users' => $this->userService->getUsers()));
 }