Commit 6abd99e3 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed account activated flag upon recovery & fixed is_account_used method to check aliases

parent 16b82b88
Pipeline #9851 passed with stages
in 2 minutes and 4 seconds
......@@ -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
......
......@@ -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;
......
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