Help rewrite code to PHP 7 from PHP 5 to determine access group level
Hell Support,
Please I have this code in my template used to hide menu based on access level. It works well till I started using your MySQLi Server Behavior.
What it does is to prevent access based on the access level given to users. Below is a sample code for Operator access level. As an administrator with "Administrator" level, I am not supposed to see their menu but now I am seeing it.
The is I believe is from this line of code <?php if (!isset($_SESSION['MM_UserGroup']) || $_SESSION['MM_UserGroup'] == 'Operator'){ ?>.
Please can you help rewrite to PHP 7 version. I used it for PHP 5.
<?php if (!isset($_SESSION['MM_UserGroup']) || $_SESSION['MM_UserGroup'] == 'Operator'){ ?>
<li class="nav-item has-treeview menu-open">
<a href="mydashboard.php" class="nav-link active">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>
My Dashboard
</p>
</a>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="far fa-money-bill-alt"></i>
<p>
My Invoice
<i class="fas fa-angle-left right"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../myinvoices.php" target="_blank" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>
My Invoice List
</p>
</a>
</li>
</ul>
</li>
</li>
<?php } ?>
Thank you