Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/UserSetting/UserSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use ilPortfolioAccessHandler;
use ilPortfolioTemplatePage;
use ilUserDefaultsPlugin;
use ilUtil;
use php4DOMDocument;
use srag\Plugins\UserDefaults\UDFCheck\UDFCheck;
use srag\Plugins\UserDefaults\Utils\UserDefaultsTrait;
Expand Down Expand Up @@ -167,6 +168,15 @@ public function create(): void

public function doAssignements(ilObjUser $user): void
{
// ILIAS_HTTP_PATH is normally set by the HTTP bootstrap, and in CLI cron by
// ilCronManagerImpl::run(). The plugin can however be reached earlier in the
// cron flow (via ilCronStartUp::authenticate() -> $user->update()), before
// that define has happened, while still pulling in GUI services that require
// it. Mirror the core fallback here so any branch of doAssignements is safe.
if (!defined('ILIAS_HTTP_PATH')) {
define('ILIAS_HTTP_PATH', ilUtil::_getHttpPath());
}

$this->setUsrObject($user);
if ($this->isValid()) {
$this->generatePortfolio();
Expand Down