# HG changeset patch # User souliane # Date 1403716290 -7200 # Node ID 2d035aaea13b1b1aa9060d4bc1c65200c659cb34 # Parent 594fbdda4a879c105cdc92c16934d808df92b31b plugin misc_account: delete the profile session after the registration is done diff -r 594fbdda4a87 -r 2d035aaea13b src/plugins/plugin_misc_account.py --- a/src/plugins/plugin_misc_account.py Wed Jun 25 19:01:00 2014 +0200 +++ b/src/plugins/plugin_misc_account.py Wed Jun 25 19:11:30 2014 +0200 @@ -189,11 +189,10 @@ 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)