mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 02:23:19 -04:00
handle case where existing user is invited to another service
This commit is contained in:
@@ -160,13 +160,16 @@ def set_up_your_profile():
|
|||||||
# create the user
|
# create the user
|
||||||
# TODO we have to provide something for password until that column goes away
|
# TODO we have to provide something for password until that column goes away
|
||||||
# TODO ideally we would set the user's preferred timezone here as well
|
# TODO ideally we would set the user's preferred timezone here as well
|
||||||
user = User.register(
|
|
||||||
name=form.name.data,
|
user = user_api_client.get_user_by_uuid_or_email(user_uuid, user_email)
|
||||||
email_address=user_email,
|
if user is None:
|
||||||
mobile_number=form.mobile_number.data,
|
user = User.register(
|
||||||
password=str(uuid.uuid4()),
|
name=form.name.data,
|
||||||
auth_type="sms_auth",
|
email_address=user_email,
|
||||||
)
|
mobile_number=form.mobile_number.data,
|
||||||
|
password=str(uuid.uuid4()),
|
||||||
|
auth_type="sms_auth",
|
||||||
|
)
|
||||||
|
|
||||||
# activate the user
|
# activate the user
|
||||||
user = user_api_client.get_user_by_uuid_or_email(user_uuid, user_email)
|
user = user_api_client.get_user_by_uuid_or_email(user_uuid, user_email)
|
||||||
|
|||||||
Reference in New Issue
Block a user