summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-01-21 19:21:24 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2025-01-21 19:21:24 +0000
commitc602587990976448fbbb1c6afa404db69fc12850 (patch)
treefce1fb506280d9670232106e7d62afa0dd896542 /core
parentc5357cab3d79cd177c277b968a311eef3dde302b (diff)
downloadtroggle-c602587990976448fbbb1c6afa404db69fc12850.tar.gz
troggle-c602587990976448fbbb1c6afa404db69fc12850.tar.bz2
troggle-c602587990976448fbbb1c6afa404db69fc12850.zip
oops bug
Diffstat (limited to 'core')
-rw-r--r--core/views/user_registration.py5
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} )