MCPcopy Create free account
hub / github.com/chrxh/alien / deleteUser

Method deleteUser

source/Network/NetworkService.cpp:233–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233bool NetworkService::deleteUser()
234{
235 log(Priority::Important, "network: delete user '" + *_loggedInUserName + "'");
236
237 httplib::SSLClient client(_serverAddress);
238 configureClient(client);
239
240 httplib::Params params;
241 params.emplace("userName", *_loggedInUserName);
242 params.emplace("password", *_password);
243
244 try {
245 auto postResult = executeRequest([&] { return client.Post("/alien-server/deleteuser.php", params); });
246
247 auto result = parseBoolResult(postResult->body);
248 if (result) {
249 return logout();
250 }
251 return result;
252 } catch (...) {
253 logNetworkError();
254 return false;
255 }
256}
257
258bool NetworkService::resetPassword(std::string const& userName, std::string const& email)
259{

Callers 1

onDeleteMethod · 0.80

Calls 6

logFunction · 0.85
configureClientFunction · 0.85
executeRequestFunction · 0.85
parseBoolResultFunction · 0.85
logNetworkErrorFunction · 0.85
PostMethod · 0.80

Tested by

no test coverage detected