Validation des mails
darcs-hash:20070521212531-c992d-3fd6d670d0b54a35dbe594c7ce14656171369f09.gz
This commit is contained in:
parent
ea07b8ec00
commit
508bffbe48
2 changed files with 23 additions and 1 deletions
|
@ -9,7 +9,7 @@ sys.path.append('/usr/scripts/gestion')
|
|||
from affich_tools import cprint, anim, OK, WARNING, ERREUR
|
||||
import config
|
||||
from time import strftime
|
||||
from ldap_crans import hostname
|
||||
from ldap_crans import hostname, crans_ldap
|
||||
|
||||
try:
|
||||
sys.path.append('/usr/lib/mailman')
|
||||
|
@ -186,3 +186,22 @@ class ML_ens:
|
|||
print OK
|
||||
mlist.Save()
|
||||
mlist.Unlock()
|
||||
|
||||
class mail_valide:
|
||||
debug = True
|
||||
|
||||
def __init__(self,aids):
|
||||
self.aids = aids
|
||||
|
||||
def reconfigure(self):
|
||||
db = crans_ldap()
|
||||
cprint(u'Validation d\'adresses', 'gras')
|
||||
for aid in self.aids:
|
||||
adh = db.search(("aid=%s" %aid), 'w')['adherent'][0]
|
||||
if not adh._modifiable:
|
||||
db.services_to_restart('mail_valide',aid)
|
||||
print "echec pour le mail de %s" %adh.nom()
|
||||
else:
|
||||
adh.mail_invalide(False)
|
||||
adh.save()
|
||||
print "mail de %s marque valide" % adh.nom()
|
||||
|
|
|
@ -173,6 +173,9 @@ class rouge(base_reconfigure):
|
|||
from adherents import del_user
|
||||
self._do(del_user(args))
|
||||
|
||||
def mail_valide(self, args):
|
||||
from adherents import mail_valide
|
||||
self._do(mail_valide(args))
|
||||
|
||||
class zamok(base_reconfigure):
|
||||
def del_user(self, args):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue