void MainWindow::on_loginButon_clicked() { UsersDBManager udb; HomeWindow *home = new HomeWindow(); //passes the value of username from MainWindow to Welcome Label of HomeWindow connect(this,SIGNAL(setUName(QString)),home,SLOT(setWelcomeLabel(QString))); //Checking the input username and password are give or not if(ui->userName_txt->text().isEmpty() || ui->password_txt->text().isEmpty()){ mainMsgBox.setText("Please input the username and password"); mainMsgBox.exec(); } setUserName(ui->userName_txt->text()); setPassword(ui->password_txt->text()); bool successLogin = udb.checkLogin(getUserName(),getPassword()); if(successLogin){ //display another home window emit setUName(ui->userName_txt->text()); home->show(); this->close(); } else { //display qmessage login failed mainMsgBox.setText("Login failed. Please enter correct \nusername and password"); mainMsgBox.exec(); } }
// todo: remove or add clone support ConnectionSettings::ConnectionSettings(const mongo::MongoURI& uri, bool isClone) : _connectionName(defaultNameConnection), _host(defaultServerHost), _port(port), _imported(false), _sshSettings(new SshSettings()), _sslSettings(new SslSettings()), _isReplicaSet((uri.type() == mongo::ConnectionString::ConnectionType::SET)), _replicaSetSettings(new ReplicaSetSettings(uri)), _clone(isClone), _uuid(QUuid::createUuid().toString()) // todo { if (!uri.getServers().empty()) { _host = uri.getServers().front().host(); _port = uri.getServers().front().port(); } auto str = std::string(uri.getOptions().getStringField("ssl")); auto sslEnabled = ("true" == str); if (sslEnabled) { _sslSettings->enableSSL(true); _sslSettings->setAllowInvalidCertificates(true); } auto credential = new CredentialSettings(); credential->setUserName(uri.getUser()); credential->setUserPassword(uri.getPassword()); credential->setDatabaseName(uri.getDatabase()); if (!credential->userName().empty() && !credential->userPassword().empty()) { // todo: credential->setEnabled(true); } addCredential(credential); }
JMUCUser::JMUCUser(JMUCSession *muc, const QString &name) : JContactResource(muc, *new JMUCUserPrivate(muc)) { Q_D(JMUCUser); setUserName(name); d->id = muc->id() % QLatin1Char('/') % name; d->muc = muc; }
int ONVIF::Users::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 3) qt_static_metacall(this, _c, _id, _a); _id -= 3; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 3) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 3; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = userName(); break; case 1: *reinterpret_cast< QString*>(_v) = passWord(); break; case 2: *reinterpret_cast< UserLevelType*>(_v) = userLevel(); break; default: break; } _id -= 3; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setUserName(*reinterpret_cast< QString*>(_v)); break; case 1: setPassWord(*reinterpret_cast< QString*>(_v)); break; case 2: setUserLevel(*reinterpret_cast< UserLevelType*>(_v)); break; default: break; } _id -= 3; } else if (_c == QMetaObject::ResetProperty) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 3; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 3) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 3; } #endif // QT_NO_PROPERTIES return _id; }
LRESULT WebServerPage::onButton(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { if (wID == IDC_WEBSERVER_ADD_USER) { WebUserDlg dlg; if (dlg.DoModal() == IDOK) { webUserList.emplace_back(make_shared<webserver::WebUser>(dlg.getUserName(), dlg.getPassWord())); addListItem(dlg.getUserName(), dlg.getPassWord()); } } else if (wID == IDC_WEBSERVER_CHANGE) { if (ctrlWebUsers.GetSelectedCount() == 1) { int sel = ctrlWebUsers.GetSelectedIndex(); auto webUser = webUserList[sel]; WebUserDlg dlg(Text::toT(webUser->getUserName()), Text::toT(webUser->getPassword())); if (dlg.DoModal() == IDOK) { webUser->setUserName(dlg.getUserName()); webUser->setPassword(dlg.getPassWord()); ctrlWebUsers.SetItemText(sel, 0, Text::toT(dlg.getUserName()).c_str()); ctrlWebUsers.SetItemText(sel, 1, Text::toT(dlg.getPassWord()).c_str()); } } } else if (wID == IDC_WEBSERVER_REMOVE_USER) { if (ctrlWebUsers.GetSelectedCount() == 1) { int sel = ctrlWebUsers.GetSelectedIndex(); webUserList.erase(find(webUserList.begin(), webUserList.end(), webUserList[sel])); ctrlWebUsers.DeleteItem(sel); } } else if (wID == IDC_WEBSERVER_START) { if (!webMgr->isRunning()) { auto plainserverPort = Util::toInt(Text::fromT(WinUtil::getEditText(ctrlPort))); auto tlsServerPort = Util::toInt(Text::fromT(WinUtil::getEditText(ctrlTlsPort))); if (webMgr->getPlainServerConfig().getPort() != plainserverPort) { webMgr->getPlainServerConfig().setPort(plainserverPort); } if (webMgr->getTlsServerConfig().getPort() != tlsServerPort) { webMgr->getTlsServerConfig().setPort(tlsServerPort); } ctrlStart.EnableWindow(FALSE); lastError.clear(); webMgr->start([&](const string& aError) { lastError += aError + "\n"; }); } else { lastError.clear(); webserver::WebServerManager::getInstance()->stop(); } } return 0; }
int UIWizardExportAppPageBasic3::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = UIWizardPage::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = format(); break; case 1: *reinterpret_cast< bool*>(_v) = isManifestSelected(); break; case 2: *reinterpret_cast< QString*>(_v) = username(); break; case 3: *reinterpret_cast< QString*>(_v) = password(); break; case 4: *reinterpret_cast< QString*>(_v) = hostname(); break; case 5: *reinterpret_cast< QString*>(_v) = bucket(); break; case 6: *reinterpret_cast< QString*>(_v) = path(); break; } _id -= 7; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setFormat(*reinterpret_cast< QString*>(_v)); break; case 1: setManifestSelected(*reinterpret_cast< bool*>(_v)); break; case 2: setUserName(*reinterpret_cast< QString*>(_v)); break; case 3: setPassword(*reinterpret_cast< QString*>(_v)); break; case 4: setHostname(*reinterpret_cast< QString*>(_v)); break; case 5: setBucket(*reinterpret_cast< QString*>(_v)); break; case 6: setPath(*reinterpret_cast< QString*>(_v)); break; } _id -= 7; } else if (_c == QMetaObject::ResetProperty) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 7; } #endif // QT_NO_PROPERTIES return _id; }
void Session::initFrom(const ConnectionInfo& connection) { setName(connection.name); setSecure(connection.secure); setPassword(connection.pass); setHost(connection.host); setPort(connection.port); setNickName(connection.nick); QString appName = QApplication::applicationName(); setUserName(connection.user.isEmpty() ? appName : connection.user); setRealName(connection.real.isEmpty() ? appName : connection.real); setChannels(connection.channels); m_quit = connection.quit; }
void DBImpl:: setConnectionInfo(std::string& server, uint32_t port, std::string& user, std::string& pw, std::string& db) { setServerURL(server); setServerPort(port); setUserName(user); setUserPassword(pw); setDatabaseName(db); }
void EditServer::setConnections(){ QObject::connect(uiServerNameLine, SIGNAL(textChanged(QString)), _server, SLOT(setServerName(QString))); QObject::connect(uiServerNameLine, SIGNAL(textChanged(QString)), this, SLOT(updateUI())); QObject::connect(uiServerAddressLine, SIGNAL(editingFinished()), this, SLOT(setServerAddress())); QObject::connect(uiServerAddressLine, SIGNAL(editingFinished()), this, SLOT(updateUI())); QObject::connect(uiUserNameLine, SIGNAL(textChanged(QString)), _server, SLOT(setUserName(QString))); QObject::connect(uiUserNameLine, SIGNAL(textChanged(QString)), this, SLOT(updateUI())); QObject::connect(uiUserPassLine, SIGNAL(textChanged(QString)), _server, SLOT(setUserPass(QString))); QObject::connect(uiUserPassLine, SIGNAL(textChanged(QString)), this, SLOT(updateUI())); QObject::connect(uiAddCalendar, SIGNAL(clicked()), this, SLOT(addCalendar())); QObject::connect(uiDeleteCalendar, SIGNAL(clicked()), this, SLOT(deleteCalendar())); }
void Player::fromPacket(sf::Packet* packet) { int clientID; float ping; std::string userName; *packet >> clientID; *packet >> userName; *packet >> ping; setClientId(clientID); setUserName(userName); setPing(ping); ship.fromPacket(packet); }
void CWizardIrcConnection::setConnection( const ConnectionInfo& connection ) { if ( !connection.nick.isEmpty() ) { setNickName( connection.nick ); } else { setNickName( quazaaSettings.Profile.IrcNickname ); } if ( !connection.real.isEmpty() ) { setRealName( connection.real ); } else { setRealName( quazaaSettings.Profile.IrcUserName ); } if ( !connection.host.isEmpty() ) { setHostName( connection.host ); } else { setHostName( "irc.paradoxirc.net" ); } if ( connection.port ) { setPort( connection.port ); } else { setPort( 6667 ); } setSecure( connection.secure ); setUserName( connection.user ); setPassword( connection.pass ); setConnectionName( connection.name ); }
void TileSocialProfile::parseFBInfo(json_t *jsonObject) { json_t *jsonID = json_object_get( jsonObject, "id" ); const char *jsonStringID = json_string_value( jsonID ); json_t *jsonName = json_object_get( jsonObject, "name" ); const char *jsonStringName = json_string_value( jsonName ); setUserID( jsonStringID ); setUserName( jsonStringName ); bufferProfilePhoto( 0 ); bufferTaggedPhotos( 0 ); if( fbInfoDownloadedCallback != NULL ) { fbInfoDownloadedCallback->run(); } }
bool osmsMessageCreateUserRequest::decode(char* xmlText) { XMLDocument* pDoc = new XMLDocument(); if (pDoc == NULL) return false; if (!pDoc->decode(xmlText, getName())) { delete pDoc; return false; } setMessageType(pDoc->getInteger("MessageType")); setUserName(pDoc->getString("UserName")); setPassword(pDoc->getString("Password")); setEmailAddress(pDoc->getString("EmailAddress")); delete pDoc; return true; }
void KCGlobal::init() { char buf[256]; buf[0] = '\0'; if (!gethostname(buf, sizeof(buf))) buf[sizeof(buf)-1] ='\0'; QString hostname(buf); setHostName(hostname); setUserName(KUser().loginName()); setRoot(getuid() == 0); setKDEVersion(KDE::versionString()); struct utsname info; uname(&info); setSystemName(info.sysname); setSystemRelease(info.release); setSystemVersion(info.version); setSystemMachine(info.machine); }
Player::Player(int clientID, std::string userName) { setClientId(clientID); setUserName(userName); }
bool QSqlDatabase::open(const QString& user, const QString& password) { setUserName(user); return d->driver->open(d->dbname, user, password, d->hname, d->port, d->connOptions); }
void KexiPasswordPage::setConnectionData(const KDbConnectionData &data) { setPassword(data.savePassword() ? data.password() : QString()); setUserName(data.userName()); setServer(data.toUserVisibleString(KDbConnectionData::NoUserVisibleStringOption)); }
void sgct_core::Viewport::configure(tinyxml2::XMLElement * element) { if (element->Attribute("user") != NULL) setUserName(element->Attribute("user")); if (element->Attribute("name") != NULL) setName(element->Attribute("name")); if (element->Attribute("overlay") != NULL) setOverlayTexture(element->Attribute("overlay")); //for backward compability if (element->Attribute("mask") != NULL) setBlendMaskTexture(element->Attribute("mask")); if (element->Attribute("BlendMask") != NULL) setBlendMaskTexture(element->Attribute("BlendMask")); if (element->Attribute("BlackLevelMask") != NULL) setBlackLevelMaskTexture(element->Attribute("BlackLevelMask")); if (element->Attribute("mesh") != NULL) setCorrectionMesh(element->Attribute("mesh")); if (element->Attribute("hint") != NULL) mMeshHint.assign(element->Attribute("hint")); if (element->Attribute("tracked") != NULL) setTracked(strcmp(element->Attribute("tracked"), "true") == 0 ? true : false); //get eye if set if (element->Attribute("eye") != NULL) { if (strcmp("center", element->Attribute("eye")) == 0) { setEye(Frustum::MonoEye); } else if (strcmp("left", element->Attribute("eye")) == 0) { setEye(Frustum::StereoLeftEye); } else if (strcmp("right", element->Attribute("eye")) == 0) { setEye(Frustum::StereoRightEye); } } const char * val; tinyxml2::XMLElement * subElement = element->FirstChildElement(); while (subElement != NULL) { val = subElement->Value(); float fTmp[2]; fTmp[0] = 0.0f; fTmp[1] = 0.0f; if (strcmp("Pos", val) == 0) { if (subElement->QueryFloatAttribute("x", &fTmp[0]) == tinyxml2::XML_NO_ERROR && subElement->QueryFloatAttribute("y", &fTmp[1]) == tinyxml2::XML_NO_ERROR) setPos(fTmp[0], fTmp[1]); else sgct::MessageHandler::instance()->print(sgct::MessageHandler::NOTIFY_ERROR, "Viewport: Failed to parse position from XML!\n"); } else if (strcmp("Size", val) == 0) { if (subElement->QueryFloatAttribute("x", &fTmp[0]) == tinyxml2::XML_NO_ERROR && subElement->QueryFloatAttribute("y", &fTmp[1]) == tinyxml2::XML_NO_ERROR) setSize(fTmp[0], fTmp[1]); else sgct::MessageHandler::instance()->print(sgct::MessageHandler::NOTIFY_ERROR, "Viewport: Failed to parse size from XML!\n"); } else if (strcmp("PlanarProjection", val) == 0) { parsePlanarProjection(subElement); }//end if planar projection else if (strcmp("FisheyeProjection", val) == 0) { parseFisheyeProjection(subElement); } else if (strcmp("SphericalMirrorProjection", val) == 0) { parseSphericalMirrorProjection(subElement); } else if (strcmp("Viewplane", val) == 0 || strcmp("Projectionplane", val) == 0) { mProjectionPlane.configure(subElement); } //iterate subElement = subElement->NextSiblingElement(); } }
INT32 _omTaskStrategyInfo::fromBSON( const BSONObj &obj ) { INT32 rc = SDB_OK ; BSONElement beField ; BSONObj ipsObj ; beField = obj.getField( OM_REST_FIELD_RULE_ID ) ; if ( !beField.isNumber() ) { PD_LOG( PDERROR, "Field[%s] must be number", beField.toString( TRUE, TRUE ).c_str() ) ; rc = SDB_INVALIDARG ; goto error ; } setID( beField.numberLong() ) ; beField = obj.getField( OM_REST_FIELD_TASK_ID ) ; if ( !beField.isNumber() ) { PD_LOG( PDERROR, "Field[%s] must be number", beField.toString( TRUE, TRUE ).c_str() ) ; rc = SDB_INVALIDARG ; goto error ; } setTaskID( beField.numberLong() ) ; beField = obj.getField( OM_REST_FIELD_TASK_NAME ) ; if ( String != beField.type() ) { PD_LOG( PDERROR, "Field[%s] must be string", beField.toString( TRUE, TRUE ).c_str() ) ; rc = SDB_INVALIDARG ; goto error ; } setTaskName( beField.str() ) ; beField = obj.getField( OM_REST_FIELD_NICE ) ; if ( !beField.isNumber() ) { PD_LOG( PDERROR, "Field[%s] must be number", beField.toString( TRUE, TRUE ).c_str() ) ; rc = SDB_INVALIDARG ; goto error ; } setNice( beField.numberInt() ) ; beField = obj.getField( OM_REST_FIELD_USER_NAME ) ; if ( String != beField.type() ) { PD_LOG( PDERROR, "Field[%s] must be string", beField.toString( TRUE, TRUE ).c_str() ) ; rc = SDB_INVALIDARG ; goto error ; } setUserName( beField.str() ) ; beField = obj.getField( OM_REST_FIELD_IPS ) ; if ( Array != beField.type() ) { PD_LOG( PDERROR, "Field[%s] must be string array", beField.toString( TRUE, TRUE ).c_str() ) ; rc = SDB_INVALIDARG ; goto error ; } else { clearIPSet() ; string tmpStr ; BSONElement e ; BSONObjIterator itr( beField.embeddedObject() ) ; while( itr.more() ) { e = itr.next() ; if ( String != beField.type() ) { PD_LOG( PDERROR, "Field[%s] must be string array", beField.toString( TRUE, TRUE ).c_str() ) ; rc = SDB_INVALIDARG ; goto error ; } tmpStr = e.str() ; if ( !tmpStr.empty() ) { addIP( tmpStr ) ; } } } done: return rc ; error: goto done ; }
bool WSqlDatabase::open(const std::string& username, const std::string& password) { setUserName(username); setPassword(password); return _driver->open(); }
void CLoginDlg::OnBnClickedLoginBtn() { // TODO: 여기에 특수화된 코드를 추가 및/또는 기본 클래스를 호출합니다. CString inputName, inputPwd, inputData; CStdioFile accountFile; BOOL isValidUser = FALSE; char dataForRead[1024] = ""; int len = 0; m_edtLoginName.GetWindowText(inputName); m_edtLoginPwd.GetWindowText(inputPwd); if(inputName.IsEmpty() || inputPwd.IsEmpty()) { CDialog::OnCancel(); return; } if(m_rdAdmin.GetCheck() == TRUE) { inputData.Format(_T("%s:%s:%s"), inputName, inputPwd, ADMIN_ACCOUNT); RTrace(_T("[zest] Admin, data = %s\n"), inputData); // Admin Check 루틴 } else if(m_rdUser.GetCheck() == TRUE) { inputData.Format(_T("%s:%s:%s"), inputName, inputPwd, USER_ACCOUNT); RTrace(_T("[zest] User, data = %s\n"), inputData); // User Check 루틴 } memcpy(dataForRead, (unsigned char*)(LPCTSTR)inputData, inputData.GetLength()); len = inputData.GetLength(); for(int i = 0; i < len; i++) dataForRead[i] = ~dataForRead[i]; accountFile.Open(LOGIN_FILE_NAME, CFile::modeRead | CFile::typeBinary); if(accountFile.m_pStream == NULL) { AfxMessageBox(NO_USER_ACCOUNT_FILE); return; } while(1) { CString fromFileData; if(accountFile.ReadString(fromFileData) != NULL) { RTrace("[zest] Account File Data = %s\n", fromFileData); if(strcmp(dataForRead, fromFileData.GetBuffer(fromFileData.GetLength())) == 0) { setUserName(inputName); isValidUser = TRUE; RTrace("[zest] Match! %s\n", inputData); break; } else { RTrace("[zest] UnMatch! %s\n", inputData); } } else break; } accountFile.Close(); if(isValidUser == FALSE) { AfxMessageBox(NO_USER_ACCOUNT); m_edtLoginName.SetWindowText(""); m_edtLoginPwd.SetWindowText(""); return; } CDialog::OnOK(); }
void PackageManager::parseUserInfo(HaypiJsonPtr data) { auto bag = getCurrBag(); auto player = getCurrPlayer(); int event = 0; Json::Value mem = (*data)["Member"]; if (!mem.isNull()) { Member* member = Member::create(); player->setMember(member); member->setBanTalk(mem["BanTalk"].asInt()); member->setDeviceID(mem["DeviceID"].asString()); member->setEMail(mem["EMail"].asString()); member->setGCName(mem["GCName"].asString()); member->setGCType(mem["GCType"].asInt()); member->setInviteBy(mem["InvitedBy"].asString()); member->setLoginTime(mem["LoginTime"].asDouble()); member->setMemberID(mem["MemberID"].asInt()); member->setName(mem["Name"].asString()); member->setRegionID(mem["RegionID"].asString()); member->setRegisterTime(mem["RegisterTime"].asDouble()); member->setStatus(mem["Status"].asInt()); player->setUserID(member->getMemberID()); player->setUserName(member->getName()); } Json::Value& stime = (*data)["STime"]; if (stime != nullptr) { GameTime::setServerTime(stime.asInt()); } Json::Value& wareall = data->at("WareHouse"); if(wareall != nullptr) { bag->updateWareByJsonValue(wareall); event |= (int)PackageEvent::WareHouse; } Json::Value& userData = (*data)["UserData"]; if (userData != Json::Value::null) { getCurrMap()->setMaxMap(userData["MaxMap"].asInt()); GameTime::setServerTime(userData["STime"].asInt()); event |= (int)PackageEvent::Map; } Json::Value& pets = (*data)["PetList"]; if (pets != Json::Value::null) { bag->updateAllPetsByJsonValue(pets); event |= (int)PackageEvent::PetInfo; } Json::Value& teams = (*data)["Teams"]; if (teams != Json::Value::null) { bag->updateAllTeamsByJsonValue(teams); event |= (int)PackageEvent::TeamInfo; } Json::Value& city = data->at("City"); if (city != nullptr) { bag->updateTechInfoByJsonValue(city); event |= (int)PackageEvent::TechInfo; } Json::Value& queue = data->at("Queue"); if (queue != nullptr) { bag->updateTechQueueByJsonValue(queue); event |= (int)PackageEvent::TechInfo; } Json::Value& petChange = data->at("PetChange"); if (petChange != nullptr) { bag->updatePetByJsonValue(petChange); event |= (int)PackageEvent::PetInfo; } Json::Value& petDel = data->at("Pet_Dels"); if (petDel != nullptr) { bag->updatePetDelByJsonValue(petDel); event |= (int)PackageEvent::PetInfo; } Json::Value& teamChange = data->at("TeamChange"); if (teamChange != nullptr) { bag->updateTeamByJsonValue(teamChange); event |= (int)PackageEvent::TeamInfo; } Json::Value& itemadd = data->at("Item_Add"); if(itemadd != nullptr) { bag->updateItemAddByJsonValue(itemadd); event |= (int)PackageEvent::WareHouse; } Json::Value& itemdel = data->at("Item_Del"); if(itemdel != nullptr) { bag->updateItemDelByJsonValue(itemdel); event |= (int)PackageEvent::WareHouse; } Json::Value& res = data->at("Res"); if (res != nullptr) { bag->updateTimerInfoByJsonValue(res); event |= (int)PackageEvent::ResTimer; event |= (int)PackageEvent::WareHouse; } if (event != 0) { event |= (int)PackageEvent::UserInfo; NetManager::getInstance()->dispatcherCustomEvent((PackageEvent)event, data); } }
Player::Player() { setClientId(-1); setUserName("<invalid>"); }
void ZDvidSynapse::setVerified(const std::string &userName) { setUserName(userName); }