diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/views/user_registration.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/views/user_registration.py b/core/views/user_registration.py index 972d82b..fe9f126 100644 --- a/core/views/user_registration.py +++ b/core/views/user_registration.py @@ -29,6 +29,7 @@ def register(request, username=None): (with cavey:beery password) but specific to an individual
"""
current_user = request.user # if not logged in, this is 'AnonymousUser'
+ warning = ""
if request.method == "POST":
form = register_form(request.POST)
@@ -50,9 +51,7 @@ def register(request, username=None): return HttpResponseRedirect("/accounts/login/")
else:
if username:
- if current_user.is_anonymous:
- warning = ""
- else:
+ if not current_user.is_anonymous:
warning = f"WARNING - you are logged-in as someone else '{current_user}'. You must logout and login again as '{username}' "
print(f"REGISTER: {warning}")
form = register_form(initial={"visible": "True", "username": username} )
|