inactive user can no longer login in
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
<metal:block use-macro="main_template">
|
<metal:block use-macro="main_template">
|
||||||
<div metal:fill-slot="content">
|
<div metal:fill-slot="content">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<div class="col-md-offset-4 col-md-4 well">
|
<div class="col-md-offset-4 col-md-4 well">
|
||||||
|
|
||||||
<form id="login-form" role="form" action="${url}" method="post" >
|
<form id="login-form" role="form" action="${url}" method="post" >
|
||||||
|
|||||||
@@ -197,7 +197,8 @@ def login(request):
|
|||||||
record = get_member_by_id(request, login)
|
record = get_member_by_id(request, login)
|
||||||
if record :
|
if record :
|
||||||
# mot de passe hash valide ?
|
# 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
|
# get user agent string from request
|
||||||
ua_string = request.user_agent
|
ua_string = request.user_agent
|
||||||
user_agent = parse(ua_string)
|
user_agent = parse(ua_string)
|
||||||
|
|||||||
Reference in New Issue
Block a user