Only print logged in user name if we are actually logged in, in order to avoid errors in logs

pull/3778/head
Isaac Connor 2023-10-05 17:03:42 -04:00
parent 38be4feeb8
commit 9ff31ab4f5
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ global $CLANG;
</button>
</div>
<div class="modal-body">
<p><?php echo sprintf( $CLANG['CurrentLogin'], validHtmlStr($user->Username()) ) ?></p>
<p><?php echo $user ? sprintf( $CLANG['CurrentLogin'], validHtmlStr($user->Username()) ) : translate('You are not logged in.') ?></p>
<?php if ( canView('System') ) { ?>
<p>Other logged in users:<br/>
<table class="table table-striped">