comparison src/plugins/plugin_misc_account.py @ 1044:85c110c0be86

plugins misc_account, misc_register_account: manually delete the sessions when not needed anymore
author souliane <souliane@mailoo.org>
date Wed, 21 May 2014 23:17:51 +0200
parents 9095263011b6
children f25ec9fd7cc4
comparison
equal deleted inserted replaced
1043:066308706dc6 1044:85c110c0be86
358 """Actually change the user XMPP account and SàT profile password 358 """Actually change the user XMPP account and SàT profile password
359 @param data (dict) 359 @param data (dict)
360 @profile (str): %(doc_profile)s 360 @profile (str): %(doc_profile)s
361 """ 361 """
362 password = self._sessions.profileGet(data['session_id'], profile)['new_password'] 362 password = self._sessions.profileGet(data['session_id'], profile)['new_password']
363 del self._sessions[data['session_id']]
363 364
364 def passwordChanged(result): 365 def passwordChanged(result):
365 d = self.host.memory.setParam(C.PROFILE_PASS_PATH[1], password, C.PROFILE_PASS_PATH[0], profile_key=profile) 366 d = self.host.memory.setParam(C.PROFILE_PASS_PATH[1], password, C.PROFILE_PASS_PATH[0], profile_key=profile)
366 d.addCallback(lambda dummy: self.host.memory.setParam("Password", password, "Connection", profile_key=profile)) 367 d.addCallback(lambda dummy: self.host.memory.setParam("Password", password, "Connection", profile_key=profile))
367 confirm_ui = xml_tools.XMLUI("popup", title=D_("Confirmation")) 368 confirm_ui = xml_tools.XMLUI("popup", title=D_("Confirmation"))