Type
magento2-module
Module which adds cli option to create customer
magento2-module
GPL-3.0-or-later
None
None
None
None
None
None
This module adds a cli command to create a customer.
Ofcourse you could also use the Magento Swiss army knife n98-magerun2
composer require mdevrees/addcustomercli
$ php bin/magento customer:create --help
Description:
Create new customer
Usage:
customer:create [options]
Options:
--customer-firstname=CUSTOMER-FIRSTNAME (Required) Customer first name
--customer-lastname=CUSTOMER-LASTNAME (Required) Customer last name
--customer-email=CUSTOMER-EMAIL (Required) Customer email
--customer-password=CUSTOMER-PASSWORD (Required) Customer password
--website=WEBSITE (Required) Website ID
--send-email[=SEND-EMAIL] (1/0) Send email? (default 0)
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
$ php bin/magento customer:create --customer-firstname="Mycha" --customer-lastname="De Vrees" --customer-email="[email protected]" --customer-password="password" --website="1"
$ php bin/magento customer:lock --help
Description:
Lock existing customer by setting a lock date
Usage:
customer:lock [options]
Options:
--customer-id=CUSTOMER-ID (Required) Customer ID
--date=DATE (Required) Date
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
$ php bin/magento customer:lock --customer-id=2 --date=2019-11-03
$ php bin/magento customer:unlock --help
Description:
Unlock existing customer
Usage:
customer:unlock [options]
Options:
--customer-id=CUSTOMER-ID (Required) Customer ID
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
$ php bin/magento customer:unlock --customer-id=2
$ php bin/magento customer:changepassword --help
Description:
Change password from existing customer
Usage:
customer:unlock [options]
Options:
--customer-id=CUSTOMER-ID (Required) Customer ID
--customer-password=CUSTOMER-PASSWORD (Required) Customer password new'
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
$ php bin/magento customer:changepassword --customer-id=2 --customer-password="password"
Initial module version, allows users to be added
Bumped version to 1.0.0, no new changes
Set composer minimum stability to dev
Nothing specific
Rename to AddCustomerCli
Added customer:user:lock and customer:user:unlock features
Added customer:changepassword and renamed so user is not needed anymore