mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Redirect logged in users from login page
This commit is contained in:
@@ -44,6 +44,8 @@ class AuthenticationForm(BaseAuthenticationForm):
|
|||||||
|
|
||||||
def login(request):
|
def login(request):
|
||||||
ctx = {}
|
ctx = {}
|
||||||
|
if request.user.is_authenticated():
|
||||||
|
return redirect('control:index')
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = AuthenticationForm(data=request.POST)
|
form = AuthenticationForm(data=request.POST)
|
||||||
if form.is_valid() and form.user_cache:
|
if form.is_valid() and form.user_cache:
|
||||||
|
|||||||
Reference in New Issue
Block a user