diff --git a/openslides/application/views.py b/openslides/application/views.py index 95a61f374..20eeca439 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -34,7 +34,7 @@ from openslides.utils.utils import template, permission_required, \ from openslides.utils.pdf import print_application, print_application_poll from openslides.system.api import config_get -from openslides.participant.api import gen_username +from openslides.participant.api import gen_username, gen_password @permission_required('application.can_see_application') @template('application/overview.html') @@ -492,6 +492,8 @@ def application_import(request): profile.committee = '' profile.gender = 'none' profile.type = 'guest' + profile.firstpassword = gen_password() + profile.user.set_password(profile.firstpassword) profile.save() users_generated += 1 # create / modify the application diff --git a/openslides/participant/views.py b/openslides/participant/views.py index 0be10d7aa..57c5bf469 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -322,7 +322,6 @@ def user_import(request): user.last_name = last_name user.first_name = first_name user.username = gen_username(first_name, last_name) - #user.set_password("%s%s" % (user.first_name, user.last_name)) #user.email = email user.save() profile = Profile() @@ -331,6 +330,8 @@ def user_import(request): profile.group = group profile.type = type profile.committee = committee + profile.firstpassword = gen_password() + profile.user.set_password(profile.firstpassword) profile.save() if type == 'delegate':