Create a fake user if not existing

This commit is contained in:
emeric
2018-03-04 16:09:03 +01:00
parent bbb988266d
commit a3fd11c85b
4 changed files with 14 additions and 1 deletions
+4
View File
@@ -101,6 +101,10 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env, Wt::Dbo::SqlConnecti
Wt::Dbo::Transaction transaction(DboSession());
firstConnection = (Database::User::getAll(DboSession()).size() == 0);
// Create a fake user
// TODO settings
Database::User::create(DboSession());
}
LMS_LOG(UI, DEBUG) << "Creating root widget. First connection = " << std::boolalpha << firstConnection;