diff src/core/sat_main.py @ 336:953536246d9d

core: added email in registerNewAccount
author Goffi <goffi@goffi.org>
date Wed, 25 May 2011 17:18:05 +0200
parents 8c9b9ef13ba1
children 9eebdc655b8b
line wrap: on
line diff
--- a/src/core/sat_main.py	Tue May 24 00:56:35 2011 +0200
+++ b/src/core/sat_main.py	Wed May 25 17:18:05 2011 +0200
@@ -265,11 +265,11 @@
             return None
         return self.profiles[profile]
 
-    def registerNewAccount(self, login, password, server, port = 5222, id = None):
+    def registerNewAccount(self, login, password, email, server, port = 5222, id = None):
         """Connect to a server and create a new account using in-band registration"""
 
         next_id = id or sat_next_id()  #the id is used to send server's answer
-        serverRegistrer = xmlstream.XmlStreamFactory(xmpp.RegisteringAuthenticator(self, server, login, password, next_id))
+        serverRegistrer = xmlstream.XmlStreamFactory(xmpp.RegisteringAuthenticator(self, server, login, password, email, next_id))
         connector = reactor.connectTCP(server, port, serverRegistrer)
         serverRegistrer.clientConnectionLost = lambda conn, reason: connector.disconnect()
         
@@ -304,7 +304,7 @@
             user = jid.parse(self.memory.getParamA("JabberID", "Connection", profile_key=profile))[0]
             password = self.memory.getParamA("Password", "Connection", profile_key=profile)
             server = self.memory.getParamA("Server", "Connection", profile_key=profile)
-            self.registerNewAccount(user, password, server, id=action_id)
+            self.registerNewAccount(user, password, None, server, id=action_id)
         else:
             self.actionResult(action_id, "SUPPRESS", {})