]> git.stg.codes - stg.git/blobdiff - projects/stargazer/users_impl.cpp
Adjusted tests.
[stg.git] / projects / stargazer / users_impl.cpp
index d66456af5aabf74bb0f5fa49d578d5d0e88f02e1..a9761455a6b9e2dd8c627192359c479df59abb3c 100644 (file)
@@ -126,6 +126,13 @@ if (FindByNameNonLock(login, &u))
 return 0;
 }
 //-----------------------------------------------------------------------------
+bool USERS_IMPL::Exists(const std::string & login) const
+{
+STG_LOCKER lock(&mutex);
+const std::map<std::string, user_iter>::const_iterator iter(loginIndex.find(login));
+return iter != loginIndex.end();
+}
+//-----------------------------------------------------------------------------
 bool USERS_IMPL::TariffInUse(const std::string & tariffName) const
 {
 STG_LOCKER lock(&mutex);
@@ -514,6 +521,7 @@ else
     }
 
 std::for_each(users.begin(), users.end(), std::mem_fun_ref(&USER_IMPL::ProcessDailyFee));
+std::for_each(users.begin(), users.end(), std::mem_fun_ref(&USER_IMPL::ProcessServices));
 
 if (settings->GetDayFeeIsLastDay())
     {