bool WebUserManager::addUser(const WebUserPtr& aUser) noexcept { auto user = getUser(aUser->getUserName()); if (user) { return false; } { WLock l(cs); users.emplace(aUser->getUserName(), aUser); } fire(WebUserManagerListener::UserAdded(), aUser); return true; }
std::string WebUserUtils::getStringInfo(const WebUserPtr& aItem, int aPropertyName) noexcept { switch (aPropertyName) { case PROP_NAME: return aItem->getUserName(); default: dcassert(0); return 0; } }