Use user.is_authenticated for Django 2.0 compatibility.

This commit is contained in:
Matthäus G. Chajdas 2017-12-02 22:39:03 +01:00
parent 7bc1467374
commit 4c72289ac8

View file

@ -71,7 +71,7 @@ def get_identity(context, prefix=None, identity_func=None, user=None):
try:
if user is None:
user = get_user_from_context(context)
if user.is_authenticated():
if user.is_authenticated:
if identity_func is not None:
return identity_func(user)
else: