From f804bacbd6abf43bf0cb98d864e2985a27e3d11a Mon Sep 17 00:00:00 2001 From: emeric Date: Mon, 16 Apr 2018 22:48:05 +0200 Subject: [PATCH] Deactive the remember me function as it does not work anymore --- src/ui/Auth.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/ui/Auth.cpp b/src/ui/Auth.cpp index d4fbc093..961d2fb4 100644 --- a/src/ui/Auth.cpp +++ b/src/ui/Auth.cpp @@ -32,16 +32,11 @@ namespace UserInterface { Auth::Auth() -: Wt::WTemplateFormView() +: Wt::WTemplateFormView(Wt::WString::tr("Lms.Auth.template")) { _model = std::make_shared(LmsApp->getDb().getAuthService(), LmsApp->getDb().getUserDatabase()); - _model->addPasswordAuth(&Database::Handler::getPasswordService()); - setTemplateText(Wt::WString::tr("Lms.Auth.template")); - addFunction("tr", &WTemplate::Functions::tr); - addFunction("id", &WTemplate::Functions::id); - // LoginName setFormWidget(Wt::Auth::AuthModel::LoginNameField, std::make_unique()); @@ -63,8 +58,9 @@ Auth::Auth() this->setHidden(true); })); - Wt::Auth::User user = _model->processAuthToken(); - _model->loginUser(LmsApp->getDb().getLogin(), user, Wt::Auth::LoginState::Weak); +// Wt::Auth::User user = _model->processAuthToken(); +// if (user.isValid()) +// _model->loginUser(LmsApp->getDb().getLogin(), user, Wt::Auth::LoginState::Weak); updateView(_model.get()); }