This commit is contained in:
Valentin Samir 2015-05-23 19:47:54 +02:00
parent 1229903dcc
commit b08d6a3f97

View File

@ -58,7 +58,7 @@ def login(request):
form = forms.UserCredential(initial={'service':service,'method':method,'warn':request.session.get("warn")}) form = forms.UserCredential(initial={'service':service,'method':method,'warn':request.session.get("warn")})
# if authenticated and successfully renewed authentication if needed # if authenticated and successfully renewed authentication if needed
if request.session.get("authenticated") request.session.get("username") and (not renew or renewed): if request.session.get("authenticated") and request.session.get("username") and (not renew or renewed):
try: try:
user = models.User.objects.get(username=request.session["username"]) user = models.User.objects.get(username=request.session["username"])
except models.User.DoesNotExist: except models.User.DoesNotExist: