‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Command\CreateBackendUserCommand Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Command\CreateBackendUserCommand:

Public Member Functions

 __construct (private readonly ConnectionPool $connectionPool, private readonly ConfigurationManager $configurationManager, private readonly LanguageServiceFactory $languageServiceFactory,)
 

Protected Member Functions

 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 

Private Member Functions

 getUsername (QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output)
 
 getPassword (QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output)
 
 getEmail (QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output)
 
 getGroups (QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output)
 
 getMaintainer (QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output)
 
 getAdmin (QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output)
 
 getFallbackValueEnvOrOption (InputInterface $input, string $option, string $envVar)
 
 getBackendUserPasswordValidationErrors (string $password)
 
 createUser (string $username, string $password, string $email='', bool $admin=false, bool $maintainer=false, array $groups=[])
 

Detailed Description

Create a new backend user

Definition at line 42 of file CreateBackendUserCommand.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::__construct ( private readonly ConnectionPool  $connectionPool,
private readonly ConfigurationManager  $configurationManager,
private readonly LanguageServiceFactory  $languageServiceFactory 
)

Definition at line 44 of file CreateBackendUserCommand.php.

Member Function Documentation

◆ configure()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::configure ( )
protected

Definition at line 52 of file CreateBackendUserCommand.php.

◆ createUser()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::createUser ( string  $username,
string  $password,
string  $email = '',
bool  $admin = false,
bool  $maintainer = false,
array  $groups = [] 
)
private

Create a backend user. similar to "\TYPO3\CMS\Install\Service\SetupService::createUser()", but accepts admin/maintainer flag and groups

Definition at line 338 of file CreateBackendUserCommand.php.

References TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Core\Core\Bootstrap\initializeBackendAuthentication().

Referenced by TYPO3\CMS\Backend\Command\CreateBackendUserCommand\execute().

◆ execute()

◆ getAdmin()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::getAdmin ( QuestionHelper  $questionHelper,
InputInterface  $input,
OutputInterface  $output 
)
private

◆ getBackendUserPasswordValidationErrors()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::getBackendUserPasswordValidationErrors ( string  $password)
private

◆ getEmail()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::getEmail ( QuestionHelper  $questionHelper,
InputInterface  $input,
OutputInterface  $output 
)
private

◆ getFallbackValueEnvOrOption()

◆ getGroups()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::getGroups ( QuestionHelper  $questionHelper,
InputInterface  $input,
OutputInterface  $output 
)
private

◆ getMaintainer()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::getMaintainer ( QuestionHelper  $questionHelper,
InputInterface  $input,
OutputInterface  $output 
)
private

◆ getPassword()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::getPassword ( QuestionHelper  $questionHelper,
InputInterface  $input,
OutputInterface  $output 
)
private

◆ getUsername()

TYPO3\CMS\Backend\Command\CreateBackendUserCommand::getUsername ( QuestionHelper  $questionHelper,
InputInterface  $input,
OutputInterface  $output 
)
private