Commit 5366d7ed authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Sébastien Blin

register account: save name

Save account registered name after name registration ended

Change-Id: Iff64d09870dc1b9592b8a4295f08e6fa1a54a38b
Reviewed-by: default avatarSébastien Blin <sebeastien.blin@savoirfairelinux.com>
parent acc39897
......@@ -468,9 +468,15 @@ NewAccountModelPimpl::slotNameRegistrationEnded(const std::string& accountId, in
account::RegisterNameStatus convertedStatus = account::RegisterNameStatus::INVALID;
switch (status)
{
case 0:
case 0: {
convertedStatus = account::RegisterNameStatus::SUCCESS;
break;
auto accountInfo = accounts.find(accountId);
if (accountInfo != accounts.end() && accountInfo->second.registeredName.empty()) {
auto conf = linked.getAccountConfig(accountId);
linked.setAccountConfig(accountId, conf);
break;
}
}
case 1:
convertedStatus = account::RegisterNameStatus::WRONG_PASSWORD;
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment