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

Method createUser

source/Network/NetworkService.cpp:107–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107bool NetworkService::createUser(std::string const& userName, std::string const& password, std::string const& email)
108{
109 log(Priority::Important, "network: create user '" + userName + "'");
110
111 httplib::SSLClient client(_serverAddress);
112 configureClient(client);
113
114 httplib::Params params;
115 params.emplace("userName", userName);
116 params.emplace("password", password);
117 params.emplace("email", email);
118
119 try {
120 auto result = executeRequest([&] { return client.Post("/alien-server/createuser.php", params); });
121 return parseBoolResult(result->body);
122 } catch (...) {
123 logNetworkError();
124 return false;
125 }
126}
127
128bool NetworkService::activateUser(std::string const& userName, std::string const& password, UserInfo const& userInfo, std::string const& confirmationCode)
129{

Callers 1

onCreateUserMethod · 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