Skip to content

Commit

Permalink
Updated Admin namespace and added comment about userOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
root913 committed Aug 20, 2024
1 parent 029f2b7 commit 4930817
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DataSource/Interpreter/AbstractInterpreter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Pimcore\Log\FileObject;
use Pimcore\Model\Tool\TmpStore;
use Pimcore\Tool;
use Pimcore\Tool\Admin;
use Psr\Log\LoggerAwareTrait;

abstract class AbstractInterpreter implements InterpreterInterface
Expand Down Expand Up @@ -213,7 +214,8 @@ protected function processImportRow(array $data)
$createQueueItem = $this->deltaChecker->hasChanged($this->configName, $this->idDataIndex, $data);
}

$userOwner = Tool\Admin::getCurrentUser()?->getId() ?? 0;
// If there is no user logged in, we use the system user (ID 0) as userOwner
$userOwner = Admin::getCurrentUser()?->getId() ?? 0;

//create queue item
if ($createQueueItem) {
Expand Down

0 comments on commit 4930817

Please sign in to comment.