Skip to content

Commit

Permalink
Only logout previously logged in users
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandgeider committed May 18, 2013
1 parent 1e6a2eb commit ece2275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wger/manager/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def logout(request):
'''
user = request.user
django_logout(request)
if user.get_profile().is_temporary:
if user.is_authenticated() and user.get_profile().is_temporary:
user.delete()
return HttpResponseRedirect(reverse('login'))

Expand Down

0 comments on commit ece2275

Please sign in to comment.