X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/3cc4710818c810ca4e899cfd3d52f091815017d2..e6f8d47a04848cfe9c07285282a463890daf6b6c:/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp?ds=sidebyside
diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp b/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp
index cd66ec9e..c54ae8eb 100644
--- a/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp
+++ b/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp
@@ -126,8 +126,8 @@ std::string UserToXML(const USER & user, bool loginInStart, bool showPass, time_
answer += "";
answer += " lastTime)
for (size_t j = 0; j < DIR_NUM; j++)
answer += " MU" + x2str(j) + "=\"" + x2str(upload[j]) + "\"";
@@ -574,8 +574,8 @@ int CHG_USER::ApplyChanges()
if (!u->GetProperty().realName.Set(m_ucr.realName.const_data(), &m_currAdmin, m_login, &m_store))
return -1;
-
if (!m_usr.cash.empty())
+ {
if (m_cashMustBeAdded)
{
if (!u->GetProperty().cash.Set(m_usr.cash.const_data() + u->GetProperty().cash,
@@ -584,11 +584,13 @@ int CHG_USER::ApplyChanges()
&m_store,
m_cashMsg))
return -1;
- else
- if (!u->GetProperty().cash.Set(m_usr.cash.const_data(), &m_currAdmin, m_login, &m_store, m_cashMsg))
- return -1;
}
-
+ else
+ {
+ if (!u->GetProperty().cash.Set(m_usr.cash.const_data(), &m_currAdmin, m_login, &m_store, m_cashMsg))
+ return -1;
+ }
+ }
if (!m_ucr.tariffName.empty())
{