X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c3d4d096451b5c683492e81574b302e5486950e1..69fb2ef1a615136544f6e1e06d95ea08419094c4:/projects/stargazer/users_impl.cpp?ds=sidebyside diff --git a/projects/stargazer/users_impl.cpp b/projects/stargazer/users_impl.cpp index d66456af..3dd7638b 100644 --- a/projects/stargazer/users_impl.cpp +++ b/projects/stargazer/users_impl.cpp @@ -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::const_iterator iter(loginIndex.find(login)); +return iter != loginIndex.end(); +} +//----------------------------------------------------------------------------- bool USERS_IMPL::TariffInUse(const std::string & tariffName) const { STG_LOCKER lock(&mutex);