FEATURE #2503: add easier installer
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user