diff --git a/code/web/services/WebBuilder/AJAX.php b/code/web/services/WebBuilder/AJAX.php index 0a0e6192df..ebbed210a1 100644 --- a/code/web/services/WebBuilder/AJAX.php +++ b/code/web/services/WebBuilder/AJAX.php @@ -972,8 +972,10 @@ function trackWebResourceUsage() { } function saveAsTemplate(){ require_once ROOT_DIR . '/sys/WebBuilder/GrapesTemplate.php'; + + $activeUser = UserAccount::getActiveUserObj(); - if (!UserAccount::isLoggedIn()) { + if (!$activeUser) { return [ 'success' => false, 'title' => translate([ @@ -1071,7 +1073,9 @@ function saveAsTemplate(){ function saveAsPage() { require_once ROOT_DIR . '/sys/WebBuilder/GrapesPage.php'; - if (!UserAccount::isLoggedIn()) { + $activeUser = UserAccount::getActiveUserObj(); + + if (!$activeUser) { return [ 'success' => false, 'title' => translate([