comparison src/plugins/plugin_misc_smtp.py @ 1031:e90125d07072

plugins misc_account, misc_smtp: update the plugins that deal with passwords
author souliane <souliane@mailoo.org>
date Mon, 12 May 2014 17:51:38 +0200
parents 301b342c697a
children f91e7028e2c3
comparison
equal deleted inserted replaced
1030:15f43b54d697 1031:e90125d07072
178 178
179 def requestAvatarId(self, credentials): 179 def requestAvatarId(self, credentials):
180 profiles = self.host.memory.getProfilesList() 180 profiles = self.host.memory.getProfilesList()
181 if not credentials.username in profiles: 181 if not credentials.username in profiles:
182 return defer.fail(cred_error.UnauthorizedLogin()) 182 return defer.fail(cred_error.UnauthorizedLogin())
183 password = self.host.memory.getParamA("Password", "Connection", profile_key=credentials.username) 183 d = self.host.memory.asyncGetParamA("Password", "Connection", profile_key=credentials.username)
184 return defer.maybeDeferred(credentials.checkPassword, 184 d.addCallback(credentials.checkPassword)
185 password).addCallback(self._cbPasswordMatch, 185 d.addCallback(self._cbPasswordMatch, credentials.username)
186 credentials.username) 186 return d
187 187
188 188
189 class SmtpServerFactory(smtp.SMTPFactory): 189 class SmtpServerFactory(smtp.SMTPFactory):
190 190
191 def __init__(self, host): 191 def __init__(self, host):