hide passord on admin creation using CLI
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
- Coupon effect inputs are now more customisable (input text, select, ajax, etc.. are usable) and unlimited amount of input for coupon effect are now possible too
|
- Coupon effect inputs are now more customisable (input text, select, ajax, etc.. are usable) and unlimited amount of input for coupon effect are now possible too
|
||||||
- when a category is deleted, all subcategories are deleted
|
- when a category is deleted, all subcategories are deleted
|
||||||
- delete products when categories are removed. Works only when the category is the default one for this product
|
- delete products when categories are removed. Works only when the category is the default one for this product
|
||||||
- Manager update exists now. Run php Thelia thelia:update
|
- Manager update exists now. Run ```php Thelia thelia:update```
|
||||||
- Coupon works now
|
- Coupon works now
|
||||||
- Improved tax rule configuration
|
- Improved tax rule configuration
|
||||||
|
|
||||||
|
|||||||
@@ -88,9 +88,10 @@ class CreateAdminUser extends ContainerAwareCommand
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function enterData($dialog, $output, $label, $error_message)
|
protected function enterData($dialog, $output, $label, $error_message, $hidden = false)
|
||||||
{
|
{
|
||||||
return $dialog->askAndValidate(
|
$command = $hidden ? 'askHiddenResponse' : 'askAndValidate';
|
||||||
|
return $dialog->$command(
|
||||||
$output,
|
$output,
|
||||||
$this->decorateInfo($label),
|
$this->decorateInfo($label),
|
||||||
function ($answer) {
|
function ($answer) {
|
||||||
@@ -122,8 +123,8 @@ class CreateAdminUser extends ContainerAwareCommand
|
|||||||
$admin->setLastname($input->getOption("last_name") ?: $this->enterData($dialog, $output, "User last name : ", "Please enter user last name."));
|
$admin->setLastname($input->getOption("last_name") ?: $this->enterData($dialog, $output, "User last name : ", "Please enter user last name."));
|
||||||
|
|
||||||
do {
|
do {
|
||||||
$password = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password : ", "Please enter a password.");
|
$password = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password : ", "Please enter a password.", true);
|
||||||
$password_again = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password (again): ", "Please enter the password again.");
|
$password_again = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password (again): ", "Please enter the password again.", true);
|
||||||
|
|
||||||
if (! empty($password) && $password == $password_again) {
|
if (! empty($password) && $password == $password_again) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user