plugin misc_account: added method getNewAccountDomain

This commit is contained in:
souliane 2013-11-07 17:01:40 +01:00
commit ba0e2c1262

View file

@ -87,6 +87,7 @@ class MiscAccount(object):
info(_(u"Plugin Account initialization"))
self.host = host
host.bridge.addMethod("registerSatAccount", ".plugin", in_sign='sss', out_sign='', method=self._registerAccount, async=True)
host.bridge.addMethod("getNewAccountDomain", ".plugin", in_sign='', out_sign='s', method=self._getNewAccountDomain, async=False)
if not self._prosody_path:
paths = which(_PROSODYCTL)
if not paths:
@ -185,3 +186,8 @@ Goffi""" % {'login': login, 'password': password, 'jid': "%s@%s" % (login, _NEW_
d = sendmail(_email_host, _email_from, _REG_ADMIN_EMAIL, msg.as_string())
d.addCallbacks(email_ok, email_ko)
def _getNewAccountDomain(self):
"""@return: the domain that will be set to new account"""
return _NEW_ACCOUNT_DOMAIN