PHP Code:
$app = new \Espo\Core\Application();
$config = $app->getContainer()->get('config');
$entityManager = $app->getContainer()->get('entityManager');
$user = $entityManager->getEntity('User', 'system');
$entityManager->setUser($user);
echo "User name is " . $user->get('name') . "\n";
$app->getContainer()->setUser($user);
$upgradeManager = new \Espo\Core\UpgradeManager($app->getContainer());
thanks,
Michele
Leave a comment: