[ejabberd] In-band registration problems when using xmpp.py library

Vineet Naik naikvin at gmail.com
Mon Apr 30 14:05:41 MSK 2012


Hi,

First of all sorry if this is more of an xmpppy question than an ejabberd
one. But looks like the xmpppy lib is not being actively maintained any
more. So hoping that some one else on this list might have faced a similar
problem, I am posting this question here.

I am trying to register new users to ejabberd database using the xmpppy
library. In-band registration is enabled in the ejabberd.cfg file.

When use this lib to register a user, it works perfectly for the first
time. But after that I cannot register any more users unless ejabberd is
restarted.

Here is the code I am using

def register(username, password):
    jid=xmpp.protocol.JID("%s@%s" % (username, DOMAIN)
    cl=xmpp.Client(jid.getDomain(),debug=[])

    cl.connect()

    reg = xmpp.features.register(cl, jid.getDomain(),
{'username':jid.getNode(),
                                                       'password':
password})

    cl.disconnect()

    return reg

-- 
Vineet Naik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120430/fd123621/attachment.html>


More information about the ejabberd mailing list