Mercurial > libervia-backend
comparison src/plugins/plugin_misc_register_account.py @ 2175:75002ac33801
plugin XEP-0077: added changePassword and removeRegistration methods
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 09 Mar 2017 00:06:13 +0100 |
parents | 545a1261ac3b |
children | 8b37a62336c3 |
comparison
equal
deleted
inserted
replaced
2174:0c32ff2f64c4 | 2175:75002ac33801 |
---|---|
78 jid = session_data['JabberID'])) | 78 jid = session_data['JabberID'])) |
79 return {'xmlui': form_ui.toXml()} | 79 return {'xmlui': form_ui.toXml()} |
80 | 80 |
81 def _registerConfirmation(self, data, profile): | 81 def _registerConfirmation(self, data, profile): |
82 """Save the related parameters and proceed the registration.""" | 82 """Save the related parameters and proceed the registration.""" |
83 client = self.host.getClient(profile) | |
84 session_data = self._sessions.profileGet(data['session_id'], profile) | 83 session_data = self._sessions.profileGet(data['session_id'], profile) |
85 | 84 |
86 self.host.memory.setParam("JabberID", session_data["JabberID"], "Connection", profile_key=profile) | 85 self.host.memory.setParam("JabberID", session_data["JabberID"], "Connection", profile_key=profile) |
87 self.host.memory.setParam("Password", session_data["Password"], "Connection", profile_key=profile) | 86 self.host.memory.setParam("Password", session_data["Password"], "Connection", profile_key=profile) |
88 self.host.memory.setParam(C.FORCE_SERVER_PARAM, session_data[C.FORCE_SERVER_PARAM], "Connection", profile_key=profile) | 87 self.host.memory.setParam(C.FORCE_SERVER_PARAM, session_data[C.FORCE_SERVER_PARAM], "Connection", profile_key=profile) |
89 self.host.memory.setParam(C.FORCE_PORT_PARAM, session_data[C.FORCE_PORT_PARAM], "Connection", profile_key=profile) | 88 self.host.memory.setParam(C.FORCE_PORT_PARAM, session_data[C.FORCE_PORT_PARAM], "Connection", profile_key=profile) |
90 | 89 |
91 d = self._registerNewAccount(client, jid.JID(session_data['JabberID']), session_data["Password"], None, session_data['server']) | 90 d = self._registerNewAccount(jid.JID(session_data['JabberID']), session_data["Password"], None, session_data['server']) |
92 del self._sessions[data['session_id']] | 91 del self._sessions[data['session_id']] |
93 return d | 92 return d |
94 | 93 |
95 def _registerNewAccount(self, client, jid_, password, email, server): | 94 def _registerNewAccount(self, client, jid_, password, email, server): |
96 # FIXME: port is not set here | 95 # FIXME: port is not set here |