create admin add confir password
This commit is contained in:
parent
99548a0c84
commit
5746177b73
1 changed files with 9 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ class CreateAdmin extends Command
|
|||
try {
|
||||
$tmp = $this->ask('Type the wanted user email', 'equipe.web@ldc.fr');
|
||||
$validator = Validator::make(['email' => $tmp], [
|
||||
'email' => 'required|unique:users,email|email:rfc,dns'
|
||||
'email' => 'required|unique:users,email|email:rfc,spoof'
|
||||
]);
|
||||
$validator->validate();
|
||||
$email = $tmp;
|
||||
|
|
@ -84,7 +84,14 @@ class CreateAdmin extends Command
|
|||
}
|
||||
}
|
||||
|
||||
$password = $this->secret('Type the wanted user password');
|
||||
$password = null;
|
||||
while (
|
||||
($password = $this->secret(
|
||||
(!\is_null($password) ? 'Failed to confirm, ' : '') . 'Type the wanted user password'
|
||||
)) !== $this->secret('Confirm the password')
|
||||
) {
|
||||
continue;
|
||||
}; //end while
|
||||
|
||||
$user = new User();
|
||||
$user->firstname = $firstname;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue