Skip to content

Commit

Permalink
Ensure user exists
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Mar 7, 2024
1 parent 94d89c2 commit 6ae8096
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/assets/CpAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ private function _registerTranslations(View $view): void

private function _registerEditableTypes(BaseView $view): void
{
$user = Craft::$app->getUser()->getIdentity();
if ($user === null) {
return;
}

$editableCampaignTypes = Json::encode($this->_getEditableCampaignTypes());
$editableMailingListTypes = Json::encode($this->_getEditableMailingListTypes());
$editableSegmentTypes = Json::encode($this->_getEditableSegmentTypes());
Expand Down

0 comments on commit 6ae8096

Please sign in to comment.