UserCreateCommand
extends Command
in package
Command to create a new user.
Note: only allow create 1 admin from this command.
Table of Contents
- TEXT_DOMAIN = 'console_command'
- SU_MEGAUSER = SU_MEGAUSER | SU_EDIT_MOUNTS | SU_EDIT_CREATURES | SU_EDIT_PETITIONS | SU_EDIT_COMMENTS | SU_EDIT_DONATIONS | SU_EDIT_USERS | SU_EDIT_CONFIG | SU_INFINITE_DAYS | SU_EDIT_EQUIPMENT | SU_EDIT_PAYLOG | SU_DEVELOPER | SU_POST_MOTD | SU_MODERATE_CLANS | SU_EDIT_RIDDLES | SU_MANAGE_MODULES | SU_AUDIT_MODERATION | SU_RAW_SQL | SU_VIEW_SOURCE | SU_NEVER_EXPIRE
- $accountRepository : mixed
- $defaultName : mixed
- $doctrine : mixed
- $passwordEncoder : mixed
- $settings : mixed
- $translator : mixed
- $validator : mixed
- __construct() : mixed
- configure() : mixed
- {@inheritdoc}
- execute() : int
- {@inheritdoc}
- getAccountRepository() : UserRepository
- getCharacterTitle() : mixed
- getEmail() : string
- getIsAdmin() : bool
- getLoginName() : string
- getPassword() : string
Constants
TEXT_DOMAIN
public
mixed
TEXT_DOMAIN
= 'console_command'
SU_MEGAUSER
protected
mixed
SU_MEGAUSER
= SU_MEGAUSER | SU_EDIT_MOUNTS | SU_EDIT_CREATURES | SU_EDIT_PETITIONS | SU_EDIT_COMMENTS | SU_EDIT_DONATIONS | SU_EDIT_USERS | SU_EDIT_CONFIG | SU_INFINITE_DAYS | SU_EDIT_EQUIPMENT | SU_EDIT_PAYLOG | SU_DEVELOPER | SU_POST_MOTD | SU_MODERATE_CLANS | SU_EDIT_RIDDLES | SU_MANAGE_MODULES | SU_AUDIT_MODERATION | SU_RAW_SQL | SU_VIEW_SOURCE | SU_NEVER_EXPIRE
Properties
$accountRepository
protected
mixed
$accountRepository
$defaultName
protected
static mixed
$defaultName
= 'lotgd:user:create'
$doctrine
protected
mixed
$doctrine
$passwordEncoder
protected
mixed
$passwordEncoder
$settings
protected
mixed
$settings
$translator
protected
mixed
$translator
$validator
protected
mixed
$validator
Methods
__construct()
public
__construct(EntityManagerInterface $doctrine, TranslatorInterface $translator, ValidatorInterface $validator, Settings $settings, UserPasswordEncoderInterface $passwordEncoder) : mixed
Parameters
- $doctrine : EntityManagerInterface
- $translator : TranslatorInterface
- $validator : ValidatorInterface
- $settings : Settings
- $passwordEncoder : UserPasswordEncoderInterface
Return values
mixed —configure()
{@inheritdoc}
protected
configure() : mixed
Return values
mixed —execute()
{@inheritdoc}
protected
execute(InputInterface $input, OutputInterface $output) : int
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
int —getAccountRepository()
private
getAccountRepository() : UserRepository
Return values
UserRepository —getCharacterTitle()
private
getCharacterTitle() : mixed
Return values
mixed —getEmail()
private
getEmail(InputInterface $input, OutputInterface $output) : string
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
string —getIsAdmin()
private
getIsAdmin(InputInterface $input, OutputInterface $output) : bool
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
bool —getLoginName()
private
getLoginName(InputInterface $input, OutputInterface $output) : string
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
string —getPassword()
private
getPassword(InputInterface $input, OutputInterface $output) : string
Parameters
- $input : InputInterface
- $output : OutputInterface