From 603f2e5760a9977de660d5beab4e31ab7e75727f Mon Sep 17 00:00:00 2001 From: souliane Date: Wed, 25 Jun 2014 19:11:30 +0200 Subject: [PATCH] plugin misc_account: delete the profile session after the registration is done --- src/plugins/plugin_misc_account.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/plugin_misc_account.py b/src/plugins/plugin_misc_account.py index f241444c..657c8af9 100755 --- a/src/plugins/plugin_misc_account.py +++ b/src/plugins/plugin_misc_account.py @@ -189,11 +189,10 @@ class MiscAccount(object): d.addCallback(lambda ignore: None) def setParams(dummy): - #FIXME: values must be in a config file instead of hardcoded - self.host.memory.setParam("JabberID", "%s@%s/%s" % (profile, self.getConfig('new_account_domain'), self.getConfig('new_account_resource')), - "Connection", profile_key=profile) - self.host.memory.setParam("Password", password, - "Connection", profile_key=profile) + jid_s = "%s@%s/%s" % (profile, self.getConfig('new_account_domain'), self.getConfig('new_account_resource')) + self.host.memory.setParam("JabberID", jid_s, "Connection", profile_key=profile) + d = self.host.memory.setParam("Password", password, "Connection", profile_key=profile) + d.addCallback(lambda dummy: self.host.memory.auth_sessions.profileDelUnique(profile)) def removeProfile(failure): self.host.memory.asyncDeleteProfile(profile)