-bool SERVICES_IMPL::AdminCorrect(const string & login, const std::string & password, ADMIN ** admin)
-{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-if (data.empty())
- {
- printfd(__FILE__, "no admin in system!\n");
- return true;
- }
-
-ADMIN_IMPL adm(0, login, "");
-admin_iter ai(find(data.begin(), data.end(), adm));
-
-if (ai == data.end())
- {
- return false;
- }
-
-if (ai->GetPassword() != password)
- {
- return false;
- }
-
-*admin = &(*ai);
-
-return true;
-}
-//-----------------------------------------------------------------------------