Commit 16b82b88 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed issue with is_account_activated not answering for aliases

parent c40bb2bf
Pipeline #9782 passed with stages
in 7 minutes and 58 seconds
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment