FEATURE #2503: add easier installer

This commit is contained in:
Michal Kváček
2017-08-24 14:15:08 +02:00
parent 8946ef7441
commit ce183d4805
9 changed files with 9921 additions and 6040 deletions
+3 -9
View File
@@ -12,13 +12,11 @@ class NewUser extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:new {email}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Creates new user';
@@ -28,13 +26,9 @@ class NewUser extends Command
*/
public function handle()
{
$email = $this->argument('email');
// check if username is really email
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$this->error($email . ' is not a valid e-mail!');
return;
}
do {
$email = $this->argument('email');
} while (!filter_var($email, FILTER_VALIDATE_EMAIL));
// ask for password
do {