mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 19:09:22 +02:00
User setup stuff
This commit is contained in:
parent
dda620ee4d
commit
2f36033eb2
2 changed files with 4 additions and 1 deletions
|
@ -60,6 +60,7 @@ class OpenIdConnectBackend(ModelBackend):
|
|||
else:
|
||||
try:
|
||||
user = UserModel.objects.get_by_natural_key(username)
|
||||
request.session["is_new_user"] = False
|
||||
except UserModel.DoesNotExist:
|
||||
return None
|
||||
# run this callback for a each login
|
||||
|
|
|
@ -114,7 +114,9 @@ def login_callback(request):
|
|||
user.set_user_verification_type()
|
||||
should_update_user = True
|
||||
|
||||
if is_new_user:
|
||||
# If we're dealing with a new user and if this field isn't set already,
|
||||
# Then set this to False. Otherwise, if we set the field manually it'll revert.
|
||||
if is_new_user and not user.finished_setup:
|
||||
user.finished_setup = False
|
||||
should_update_user = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue