X-Git-Url: https://git.auf.org/?p=auf_roa_authentification_backend.git;a=blobdiff_plain;f=auf_roa_authentification_backend%2Fbackends.py;h=cd56d26f76ae8777d9ba2979b594d936c9fd020c;hp=a7dca1673709b79977cd6d02dcecd8a92d8dfcec;hb=HEAD;hpb=6c86ad81e2b0d721c211be7acdb9b4479763f62a diff --git a/auf_roa_authentification_backend/backends.py b/auf_roa_authentification_backend/backends.py index a7dca16..cd56d26 100644 --- a/auf_roa_authentification_backend/backends.py +++ b/auf_roa_authentification_backend/backends.py @@ -21,7 +21,10 @@ class CascadeBackend(ModelBackend): # Cherche les comptes roa+locaux remoteUser = localUser = None try: - remoteUser = RemoteUser.objects.get (email=email, password=md5pass) + if settings.AUTH_PASSWORD_REQUIRED: + remoteUser = RemoteUser.objects.get (email=email, password=md5pass) + else: + remoteUser = RemoteUser.objects.get (email=email) except: pass try: