diff --git a/app/controllers/courseware/lti.php b/app/controllers/courseware/lti.php
index 7792051d95330b0838855f06c89c7f648fdfe112..93159cc61ddc6bb146c71b841ad0a10693b179d0 100644
--- a/app/controllers/courseware/lti.php
+++ b/app/controllers/courseware/lti.php
@@ -11,7 +11,7 @@ class Courseware_LtiController extends AuthenticatedController
     public function iframe_action($block_id)
     {
         $cw_block = \Courseware\Block::find($block_id);
-        if (!$cw_block->container->structural_element->canRead($GLOBALS['user']->id)) {
+        if (!$cw_block->container->structural_element->canRead(User::findCurrent())) {
             throw new AccessDeniedException();
         }
 
diff --git a/lib/classes/globalsearch/GlobalSearchCourseware.php b/lib/classes/globalsearch/GlobalSearchCourseware.php
index de069fe887e83b9875029a621807aac25b11fc90..1d34ad7a4f9aca76fbc7aa02693b72b24b04da5b 100644
--- a/lib/classes/globalsearch/GlobalSearchCourseware.php
+++ b/lib/classes/globalsearch/GlobalSearchCourseware.php
@@ -118,7 +118,7 @@ class GlobalSearchCourseware extends GlobalSearchModule implements GlobalSearchF
     {
         $structural_element = StructuralElement::find($data['id']);
         $unit = $structural_element->findUnit();
-        if ($unit && $structural_element->canRead($GLOBALS['user'])) {
+        if ($unit && $structural_element->canRead(User::findCurrent())) {
             $description = '';
             if ($data['type'] === 'cw_structural_elements') {
                 $description = self::mark($structural_element->payload['description'], $search, true);