Skip to content

Commit

Permalink
Add authenticated users to user generation (#3946)
Browse files Browse the repository at this point in the history
  • Loading branch information
LOBsTerr committed Apr 10, 2019
1 parent a267393 commit f7cf0fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Command/Create/UsersCommand.php
Expand Up @@ -89,7 +89,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
{
$rids = $input->getArgument('roles');
if (!$rids) {
$roles = $this->drupalApi->getRoles();
$roles = $this->drupalApi->getRoles(true, true);
$rids = $this->getIo()->choice(
$this->trans('commands.create.users.questions.roles'),
array_values($roles),
Expand Down
2 changes: 1 addition & 1 deletion src/Command/User/CreateCommand.php
Expand Up @@ -184,7 +184,7 @@ protected function interact(InputInterface $input, OutputInterface $output)

$roles = $input->getOption('roles');
if (!$roles) {
$systemRoles = $this->drupalApi->getRoles(false, false, false);
$systemRoles = $this->drupalApi->getRoles(true, true, false);
$roles = $this->getIo()->choice(
$this->trans('commands.user.create.questions.roles'),
array_values($systemRoles),
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/DrupalApi.php
Expand Up @@ -131,7 +131,7 @@ public function getVocabularies()
*
* @return array
*/
public function getRoles($reset=false, $authenticated=false, $anonymous=false)
public function getRoles($reset = false, $authenticated = false, $anonymous = false)
{
if ($reset || !$this->roles) {
$roles = $this->entityTypeManager->getStorage('user_role')->loadMultiple();
Expand Down

0 comments on commit f7cf0fd

Please sign in to comment.