diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 4c48fb2a..bc191a66 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -21,7 +21,7 @@ import ldap, ldap.modlist import config, annuaires, iptools, chgpass, user_tests from affich_tools import coul -from time import sleep +from time import sleep,localtime import ldap_secret @@ -367,6 +367,9 @@ class crans_ldap : # Formatage adresse mac try : el = '(macAddress=%s)' % format_mac(expr) except : return '' + elif champ == 'paiement' and localtime()[1] == 9 and int(expr) == ann_scol: + # Dangereux, année de paiement + el = "(|(paiement=%s)(paiement=%s))" % (int(ann_scol),int(ann_scol)-1) else : # Cas général el = '(%s=%s)' % (champ, expr)