Make the remember-me feature make again

This commit is contained in:
emeric
2018-04-19 13:47:45 +02:00
parent 3b83b37c38
commit a30938a7f9
2 changed files with 10 additions and 7 deletions
+3 -3
View File
@@ -119,7 +119,7 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env, Wt::Dbo::SqlConnecti
firstConnection = (Database::User::getAll(LmsApp->getDboSession()).size() == 0);
}
LMS_LOG(UI, DEBUG) << "Creating root widget. First connection = " << std::boolalpha << firstConnection;
LMS_LOG(UI, DEBUG) << "Creating root widget. First connection = " << firstConnection;
if (firstConnection)
{
@@ -127,8 +127,6 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env, Wt::Dbo::SqlConnecti
}
else
{
_auth = root()->addNew<Auth>();
LmsApp->getDb().getLogin().changed().connect(std::bind([=]
{
try
@@ -141,6 +139,8 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env, Wt::Dbo::SqlConnecti
throw std::runtime_error("Internal error");
}
}));
_auth = root()->addNew<Auth>();
}
}