Skip to content

Commit b087100

Browse files
committed
Add additional check for model user property
1 parent 0b0cae4 commit b087100

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Templates/User/Update.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ switch ($this->getContext()->website_error[1] ?? null)
113113
$avatar = ($this->getContext()->user ? $this->getContext()->user->getAvatarURI(512) : null);
114114
require('./Includes/header.inc.phtml'); ?>
115115
<div class="container">
116-
<? if ($this->getContext()->_responseCode == \BNETDocs\Libraries\Core\HttpCode::HTTP_FORBIDDEN) { ?>
116+
<? if (!$this->getContext()->user || $this->getContext()->_responseCode == \BNETDocs\Libraries\Core\HttpCode::HTTP_FORBIDDEN) { ?>
117117
<h1 class="text-danger"><?=$title?></h1>
118118
<div class="alert alert-danger">
119119
<p class="mb-0">You are not authorized to access this page.</p>

0 commit comments

Comments
 (0)