mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Fixed account activated flag upon recovery & fixed is_account_used method to check aliases
This commit is contained in:
parent
16b82b88bc
commit
6abd99e397
2 changed files with 15 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue