Alternative Content By Group (2)
Below you can see the code used to provide alternative content on this page, so that registered users that are assigned to group2 see the message "You have access" and all others will see "You DO NOT have access".
What the user sees
Message:
You DO NOT have access.
You DO NOT have access.
The code used
<?php if ($userSessionPro->hasGroupAccess('group2')){ ?>
<div class="demoMessage">Message:<br />You have access.</div>
<?php }else{ ?>
<div class="demoMessage">Message:<br />You DO NOT have access.</div>
<?php } ?>