diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index 2e338be..c8395a2 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 13 +%define build_number 14 #%if %{build_number} #%define build_number_ext -%{build_number} #%endif diff --git a/src/xmlrpc/accounts.php b/src/xmlrpc/accounts.php index 39c0cab..75961d8 100644 --- a/src/xmlrpc/accounts.php +++ b/src/xmlrpc/accounts.php @@ -48,11 +48,19 @@ function xmlrpc_is_account_used($method, $args) { $account = new Account($db); $account->username = $user; $account->domain = $domain; - + if ($account->getOne()) { return OK; } + $alias = new Alias($db); + $alias->alias = $user; + $alias->domain = $domain; + + if ($alias->getOne()) { + return OK; + } + return NOK; } @@ -119,6 +127,11 @@ function xmlrpc_recover_account_from_confirmation_key($method, $args) { return KEY_DOESNT_MATCH; } + if (!is_activated($account)) { + $account->activated = "1"; + $account->update(); + } + $password = new Password($db); $password->account_id = $account->id; $password->algorithm = $algo;