MDL-68788 core_notification: Check if the user is logged in

This commit is contained in:
Mathew May 2020-05-21 16:24:46 +08:00
parent 1afe68f382
commit eff7ef2cd2
4 changed files with 11 additions and 6 deletions

View file

@ -1414,7 +1414,8 @@ class core_renderer extends renderer_base {
if (!empty($this->page->context->id)) {
$this->page->requires->js_call_amd('core/notification', 'init', array(
$this->page->context->id,
\core\notification::fetch_as_array($this)
\core\notification::fetch_as_array($this),
isloggedin()
));
}
$footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);