mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Removed get_account_by_confirmation_key
This commit is contained in:
parent
7d134036b9
commit
e3698d362b
2 changed files with 0 additions and 45 deletions
|
|
@ -142,47 +142,6 @@ function xmlrpc_get_phone_account($method, $args) {
|
|||
return $result;
|
||||
}
|
||||
|
||||
// args = [confirmation_key, [algo]]
|
||||
function xmlrpc_get_account_by_confirmation_key($method, $args) {
|
||||
$confirmation_key = $args[0];
|
||||
$algo = get_algo($args[1]);
|
||||
|
||||
Logger::getInstance()->message("[XMLRPC] xmlrpc_get_account_by_confirmation_key(" . $confirmation_key . ")");
|
||||
|
||||
if ($confirmation_key == "ERROR") {
|
||||
return KEY_DOESNT_MATCH;
|
||||
}
|
||||
|
||||
$database = new Database();
|
||||
$db = $database->getConnection();
|
||||
|
||||
$account = new Account($db);
|
||||
$account->confirmation_key = $confirmation_key;
|
||||
|
||||
if (!$account->getOne()) {
|
||||
return ACCOUNT_NOT_FOUND;
|
||||
}
|
||||
|
||||
$user_info = new UserInfo($db);
|
||||
$user_info->account_id = $account->id;
|
||||
$user_info->getOne();
|
||||
|
||||
$result = array(
|
||||
"id" => $account->id,
|
||||
"username" => $account->username,
|
||||
"domain" => $account->domain,
|
||||
"email" => $account->email,
|
||||
"alias" => $account->alias,
|
||||
"activated" => $account->activated,
|
||||
"firstname" => $user_info->firstname,
|
||||
"lastname" => $user_info->lastname,
|
||||
"gender" => $user_info->gender,
|
||||
"subscribe" => $user_info->subscribe
|
||||
);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
// args = [username, ha1, firstname, lastname, gender, subscribe, [domain], [algo]]
|
||||
function xmlrpc_update_account_user_info($method, $args) {
|
||||
$username = $args[0];
|
||||
|
|
@ -241,7 +200,6 @@ function xmlrpc_update_account_user_info($method, $args) {
|
|||
function xmlrpc_user_info_register_methods($server) {
|
||||
xmlrpc_server_register_method($server, 'get_email_account', 'xmlrpc_get_email_account'); // args = [username, ha1, [domain], [algo]]
|
||||
xmlrpc_server_register_method($server, 'get_phone_account', 'xmlrpc_get_phone_account'); // args = [tel, ha1, [domain], [algo]]
|
||||
xmlrpc_server_register_method($server, 'get_account_by_confirmation_key', 'xmlrpc_get_account_by_confirmation_key'); // args = [confirmation_key, [algo]]
|
||||
xmlrpc_server_register_method($server, 'update_account_user_info', 'xmlrpc_update_account_user_info'); // args = [username, ha1, firstname, lastname, gender, subscribe, [domain], [algo]]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,9 +65,6 @@ if (USE_DIGEST_AUTH) {
|
|||
// compatibility
|
||||
13 => 'create_account',
|
||||
14 => 'create_account_with_useragent',
|
||||
|
||||
// user_info
|
||||
15 => 'get_account_by_confirmation_key',
|
||||
);
|
||||
|
||||
// Get authentication header if there is one
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue