6 use Symfony\Component\Console\Input\InputInterface;
7 use Symfony\Component\Console\Output\OutputInterface;
33 }
catch (\Exception $ex) {
63 final protected function login() {
64 if (!$this->getDefinition()->hasOption(
'as')) {
100 if (!$this->getDefinition()->hasOption(
'language')) {
Adds interaction to a console command.
option($name)
Returns option value.
dumpRegisters()
Dump and output system and error messages.
error($message)
Print an error.
Abstract command with some utility methods.
command()
Command to be executed.
execute(InputInterface $input, OutputInterface $output)
{}
setLanguage()
Set the language for this cli command.
login()
Login a user defined by –as option.
Exception thrown if an error which can only be found on runtime occurs.
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
_elgg_services()
Get the global service provider.
elgg_get_user_by_username(string $username, bool $try_email=false)
Get a user by username.
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
elgg_login(\ElggUser $user, bool $persistent=false)
Log in a user.
elgg_logout()
Log the current user out.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.