From b3c98dd207e21d3fbe65f0f496697e29ef856f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Sat, 4 Jan 2020 15:42:11 +0100 Subject: [PATCH] Added optional argument '--email' for createopenslidesuser command. --- openslides/users/management/commands/createopenslidesuser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openslides/users/management/commands/createopenslidesuser.py b/openslides/users/management/commands/createopenslidesuser.py index 988904bae..4e8a58191 100644 --- a/openslides/users/management/commands/createopenslidesuser.py +++ b/openslides/users/management/commands/createopenslidesuser.py @@ -16,12 +16,14 @@ class Command(BaseCommand): parser.add_argument("username", help="The username of the new user.") parser.add_argument("password", help="The password of the new user.") parser.add_argument("groups_id", help="The group id of the new user.") + parser.add_argument("--email", help="The email address of the new user.") def handle(self, *args, **options): user_data = { "first_name": options["first_name"], "last_name": options["last_name"], "default_password": options["password"], + "email": options["email"] or "", } user = User.objects.create_user( options["username"], options["password"], skip_autoupdate=True, **user_data