Removed get_account_by_confirmation_key

This commit is contained in:
Sylvain Berfini 2019-08-21 12:21:00 +02:00
parent 7d134036b9
commit e3698d362b
2 changed files with 0 additions and 45 deletions

View file

@ -142,47 +142,6 @@ function xmlrpc_get_phone_account($method, $args) {
return $result; 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]] // args = [username, ha1, firstname, lastname, gender, subscribe, [domain], [algo]]
function xmlrpc_update_account_user_info($method, $args) { function xmlrpc_update_account_user_info($method, $args) {
$username = $args[0]; $username = $args[0];
@ -241,7 +200,6 @@ function xmlrpc_update_account_user_info($method, $args) {
function xmlrpc_user_info_register_methods($server) { 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_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_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]] xmlrpc_server_register_method($server, 'update_account_user_info', 'xmlrpc_update_account_user_info'); // args = [username, ha1, firstname, lastname, gender, subscribe, [domain], [algo]]
} }

View file

@ -65,9 +65,6 @@ if (USE_DIGEST_AUTH) {
// compatibility // compatibility
13 => 'create_account', 13 => 'create_account',
14 => 'create_account_with_useragent', 14 => 'create_account_with_useragent',
// user_info
15 => 'get_account_by_confirmation_key',
); );
// Get authentication header if there is one // Get authentication header if there is one