-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-onAddNotifiers.erase(n);
-}
-//-----------------------------------------------------------------------------
-void USERS_IMPL::AddNotifierUserDel(NOTIFIER_BASE<USER_PTR> * n)
-{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-onDelNotifiers.insert(n);
-}
-//-----------------------------------------------------------------------------
-void USERS_IMPL::DelNotifierUserDel(NOTIFIER_BASE<USER_PTR> * n)
-{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-onDelNotifiers.erase(n);
-}
-//-----------------------------------------------------------------------------
-void USERS_IMPL::AddNotifierUserAdd(NOTIFIER_BASE<USER_IMPL_PTR> * n)
-{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-onAddNotifiersImpl.insert(n);
-}
-//-----------------------------------------------------------------------------
-void USERS_IMPL::DelNotifierUserAdd(NOTIFIER_BASE<USER_IMPL_PTR> * n)
-{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-onAddNotifiersImpl.erase(n);
-}
-//-----------------------------------------------------------------------------
-void USERS_IMPL::AddNotifierUserDel(NOTIFIER_BASE<USER_IMPL_PTR> * n)
-{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-onDelNotifiersImpl.insert(n);
-}
-//-----------------------------------------------------------------------------
-void USERS_IMPL::DelNotifierUserDel(NOTIFIER_BASE<USER_IMPL_PTR> * n)
-{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-onDelNotifiersImpl.erase(n);
+std::lock_guard<std::mutex> lock(m_mutex);
+auto iter = users.begin();
+while (iter != users.end())
+ {
+ if (iter->GetLogin() != login &&
+ !iter->GetProperties().ips.Get().isAnyIP() &&
+ iter->GetProperties().ips.Get().find(ip))
+ {
+ if (user != nullptr)
+ *user = &(*iter);
+ return true;
+ }
+ ++iter;
+ }
+return false;