PHP Code Snippet to Check If a Member/User is NOT Logged In

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000095725-php-code-snippet-to-check-if-a-member-user-is-not-logged-in

The code snippet below will  determine if members are not currently logged into their accounts on the website.


<?php
// Check if the user is not logged in
if (!user::isUserLogged($_COOKIE)) {
?>

TEXT TO DISPLAY WHEN MEMBER NOT LOGGED IN

<?php } ?>


Replace "TEXT TO DISPLAY WHEN MEMBER NOT LOGGED IN" with your desired content. This content will be displayed only when a user is not logged in.