Mercurial > libervia-backend
comparison src/plugins/plugin_misc_account.py @ 1091:2d035aaea13b
plugin misc_account: delete the profile session after the registration is done
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 25 Jun 2014 19:11:30 +0200 |
parents | 8e0072754413 |
children | 628e320eab1f |
comparison
equal
deleted
inserted
replaced
1090:594fbdda4a87 | 1091:2d035aaea13b |
---|---|
187 d = ProsodyRegisterProtocol.prosodyctl(self, 'adduser', password, profile) | 187 d = ProsodyRegisterProtocol.prosodyctl(self, 'adduser', password, profile) |
188 d.addCallback(self._sendEmails, profile, email, password) | 188 d.addCallback(self._sendEmails, profile, email, password) |
189 d.addCallback(lambda ignore: None) | 189 d.addCallback(lambda ignore: None) |
190 | 190 |
191 def setParams(dummy): | 191 def setParams(dummy): |
192 #FIXME: values must be in a config file instead of hardcoded | 192 jid_s = "%s@%s/%s" % (profile, self.getConfig('new_account_domain'), self.getConfig('new_account_resource')) |
193 self.host.memory.setParam("JabberID", "%s@%s/%s" % (profile, self.getConfig('new_account_domain'), self.getConfig('new_account_resource')), | 193 self.host.memory.setParam("JabberID", jid_s, "Connection", profile_key=profile) |
194 "Connection", profile_key=profile) | 194 d = self.host.memory.setParam("Password", password, "Connection", profile_key=profile) |
195 self.host.memory.setParam("Password", password, | 195 d.addCallback(lambda dummy: self.host.memory.auth_sessions.profileDelUnique(profile)) |
196 "Connection", profile_key=profile) | |
197 | 196 |
198 def removeProfile(failure): | 197 def removeProfile(failure): |
199 self.host.memory.asyncDeleteProfile(profile) | 198 self.host.memory.asyncDeleteProfile(profile) |
200 return failure | 199 return failure |
201 | 200 |