diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 3425453f..f72860c6 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -2407,6 +2407,7 @@ class Adherent(BaseProprietaire): if mailexist(login): raise ValueError(u"Login existant ou correspondant à un alias mail.", 1) + # b2moo: à fixer pour les homes home = '/home/' + login if os.path.exists(home): raise ValueError(u'Création du compte impossible : home existant', 1) diff --git a/surveillance/comptes_inactifs.py b/surveillance/comptes_inactifs.py index 8441a4c2..550c831b 100755 --- a/surveillance/comptes_inactifs.py +++ b/surveillance/comptes_inactifs.py @@ -204,7 +204,7 @@ comptes_inactifs.py date = strftime(u'%d/%m/%Y %H:%M', localtime(date)) else: date = u'Jamais' - forward = os.path.isfile('/home/%s/.forward' % login) and u'X' or u'' + forward = os.path.isfile(os.path.join(a.home(), '.forward')) and u'X' or u'' mail = nb_mails_non_lus(login) mail = mail == None and u'?' or mail > 0 and u'X' or u' ' ligne = (a.id(), login, a.Nom(), date, forward, mail) @@ -234,7 +234,7 @@ comptes_inactifs.py (doit être exécuté en tant que root). """ # Nombre de personnes concernées, en expansant de droite à gauche : - # inscrit/ancien, avec/sans procmail, avec/sans mail non lu + # inscrit/ancien, avec/sans .forward, avec/sans mail non lu # Voir aussi template_path stats = [0, 0, 0, 0, 0, 0, 0, 0] @@ -253,7 +253,7 @@ comptes_inactifs.py # est-ce un membre inscrit ? if ann_scol not in a.paiement(): i += 4 # a-t-il un .forward ? - if not os.path.isfile('/home/%s/.forward' % login): i += 2 + if not os.path.isfile(os.path.join(a.home(), '.forward')): i += 2 # a-il-des mails non lus ? if not mail: i += 1 # on incrémente