inactive user can no longer login in

This commit is contained in:
2019-08-26 17:18:24 +02:00
parent 8f2e76cbfa
commit 6859ddcacd
2 changed files with 8 additions and 5 deletions

View File

@@ -197,7 +197,8 @@ def login(request):
record = get_member_by_id(request, login)
if record :
# mot de passe hash valide ?
if record.mdp == to_sha1(password):
import pdb;pdb.set_trace()
if record.mdp == to_sha1(password) and record.actif == 1:
# get user agent string from request
ua_string = request.user_agent
user_agent = parse(ua_string)