Fix #1522 -- Login button redirects to authentication url with… (#1525)

This commit is contained in:
Maico Timmerman
2019-12-16 10:42:51 +01:00
committed by Raphael Michel
parent 488ee19b11
commit 28242e52aa
2 changed files with 9 additions and 1 deletions

View File

@@ -32,7 +32,8 @@ class LoginForm(forms.Form):
for k, f in backend.login_form_fields.items():
self.fields[k] = f
if not settings.PRETIX_LONG_SESSIONS:
# Authentication backends which use urls cannot have long sessions.
if not settings.PRETIX_LONG_SESSIONS or backend.url:
del self.fields['keep_logged_in']
else:
self.fields.move_to_end('keep_logged_in')