diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index a471131..2e338be 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -8,7 +8,7 @@ #%define _datadir %{_datarootdir} #%define _docdir %{_datadir}/doc -%define build_number 12 +%define build_number 13 #%if %{build_number} #%define build_number_ext -%{build_number} #%endif diff --git a/src/xmlrpc/accounts.php b/src/xmlrpc/accounts.php index 3341830..39c0cab 100644 --- a/src/xmlrpc/accounts.php +++ b/src/xmlrpc/accounts.php @@ -74,7 +74,18 @@ function xmlrpc_is_account_activated($method, $args) { $account->domain = $domain; if (!$account->getOne()) { - return ACCOUNT_NOT_FOUND; + $alias = new Alias($db); + $alias->alias = $user; + $alias->domain = $domain; + + if ($alias->getOne()) { + $account->id = $alias->account_id; + if (!$account->getOne()) { + return ACCOUNT_NOT_FOUND; + } + } else { + return ACCOUNT_NOT_FOUND; + } } Logger::getInstance()->message("Account activation status is " . $account->activated);