diff --git a/pluginfile.php b/pluginfile.php index 40ac9f91faf..5e913978325 100644 --- a/pluginfile.php +++ b/pluginfile.php @@ -406,7 +406,7 @@ if ($component === 'blog') { $filename = array_pop($args); $filepath = $args ? '/'.implode('/', $args).'/' : '/'; - if (!$file = $fs->get_file($context->id, 'user', 'profile', 0, $filepath, $filename) or $file->is_directory()) { + if (!$file = $fs->get_file($usercontext->id, 'user', 'profile', 0, $filepath, $filename) or $file->is_directory()) { send_file_not_found(); }