diff --git a/data/.data b/data/.data
new file mode 100644
index 0000000000..0519ecba6e
--- /dev/null
+++ b/data/.data
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/install/core/Installer.php b/install/core/Installer.php
index 394eb5b940..9d1988b911 100644
--- a/install/core/Installer.php
+++ b/install/core/Installer.php
@@ -1,4 +1,4 @@
-app = new \Espo\Core\Application();
$this->writableList[] = $this->app->getContainer()->get('config')->get('configPath');
+
+ $user = $this->getEntityManager()->getEntity('User');
+ $this->app->getContainer()->setUser($user);
}
protected function getEntityManager()
@@ -158,9 +161,6 @@ class Installer
public function buildDatabase()
{
- $user = $this->getEntityManager()->getEntity('User');
- $this->app->getContainer()->setUser($user);
-
try {
$this->app->getContainer()->get('schema')->rebuild();
} catch (\Exception $e) {
diff --git a/install/core/tpl/main.tpl b/install/core/tpl/main.tpl
index 869f6e6dcc..1946b4b8bf 100644
--- a/install/core/tpl/main.tpl
+++ b/install/core/tpl/main.tpl
@@ -20,7 +20,7 @@