add
class add extends command
Properties
protected user | $user | from command | |
protected array | $data | ||
protected driver_interface | $db | ||
protected config | $config | ||
protected language | $language | ||
protected manager | $password_manager | ||
protected string | $phpbb_root_path | phpBB root path |
|
protected string | $php_ext | PHP extension. |
Methods
Construct method
Create a styled progress bar
Sets the command name and description
Executes the command user:add
Interacts with the user.
Validate the submitted user data
Get the group id
Send account activation email
Helper to translate questions to the user
Details
at line 72
__construct(user $user, driver_interface $db, config $config, language $language, manager $password_manager, string $phpbb_root_path, string $php_ext)
Construct method
in
command at line 45
ProgressBar
create_progress_bar(int $max, SymfonyStyle $io, OutputInterface $output, bool $message = false)
Create a styled progress bar
at line 90
protected null
configure()
Sets the command name and description
at line 134
protected int
execute(InputInterface $input, OutputInterface $output)
Executes the command user:add
Adds a new user to the database. If options are not provided, it will ask for the username, password and email. User is added to the registered user group. Language and timezone default to $config settings.
at line 184
protected
interact(InputInterface $input, OutputInterface $output)
Interacts with the user.
at line 231
protected null
validate_user_data()
Validate the submitted user data
at line 264
protected null
get_group_id()
Get the group id
Go and find in the database the group_id corresponding to 'REGISTERED'
at line 288
protected null
send_activation_email(int $user_id)
Send account activation email
at line 331
protected string
ask_user(string $key)
Helper to translate questions to the user