[jabber] Finalisation de la migration à ejabberd

Ignore-this: e5b71a7f580e1db950bb30d9d7745fbe
 * une vcard est automatiquement créée avec FN et EMAIL
 * lostPassword.py envoie un mail aux nounous
 * images et css plus accessibles

darcs-hash:20090809213427-bd074-19f0565242fb93d2051347eb47289e096bce00d9.gz
This commit is contained in:
Antoine Durand-Gasselin 2009-08-09 23:34:27 +02:00
parent d65ba27a7f
commit 29e2ecae71
9 changed files with 84 additions and 124 deletions

View file

@ -7,7 +7,7 @@
# Migration à ejabberd le 9 août 2009 -- adg #
##############################################
import os, cgi, string, time, sys, commands
import os, cgi, string, time, sys, commands, datetime
form = cgi.FieldStorage()
print "content-type: text/html"
print
@ -103,6 +103,27 @@ if user and password and nom and prenom and mail:
page += '<p><b>ejabberdctl&nbsp:</b> %s</p>' % msg
if r == 0:
r, msg = commands.getstatusoutput('/usr/sbin/ejabberdctl %s%s%s%s' %
('vcard-set', commands.mkarg(user),
' jabber.crans.org EMAIL USERID',
commands.mkarg(mail)))
if r and msg:
page += '<p><b>ejabberdctl&nbsp:</b> %s</p>' % msg
r, msg = commands.getstatusoutput('/usr/sbin/ejabberdctl %s%s%s%s' %
('vcard-set', commands.mkarg(user),
' jabber.crans.org FN',
commands.mkarg('%s %s' % (prenom,nom))))
if r and msg:
page += '<p><b>ejabberdctl&nbsp:</b> %s</p>' % msg
try:
log = open(logfile, 'a')
now = datetime.datetime.now()
log.write('%(now)s Creation de %(user)s@jabber.crans.org par %(prenom)s %(nom)s <%(mail)s>\n' % locals())
log.close()
except Exception, e:
page+= str(e)
page += "<b>Enregistrement réussi :</b><br><ul>"
page += "<li>vous pouvez immédiatement vous connecter au serveur jabber du crans<br>"
page += "<li>Votre nom d'utilisateur est : %s<br>" % user