Jump to content

If Logged In/Out


Jordan

Recommended Posts

I've been configuring some pages to be set up so that a user needs to be logged in, however the text that is displayed when a user is not logged in, is still displayed when a user IS logged in.

 

What statements would I use for the content that should ONLY be displayed when I user is NOT logged in? =)

Link to comment
Share on other sites

I've been configuring some pages to be set up so that a user needs to be logged in, however the text that is displayed when a user is not logged in, is still displayed when a user IS logged in.

 

What statements would I use for the content that should ONLY be displayed when I user is NOT logged in? =)

 

{if !$loggedin}
Item you don't want displayed [u]when[/u] logged in
{/if}

 

{if $loggedin}
Item you don't want displayed [u]unless[/u] logged in
{/if}

Link to comment
Share on other sites

  • 2 weeks later...
Does this work outside the WHMCS directory? So if I have pages at mydomain.tld and WHMCS is at mydomain.tld/WHMCS, is there anything I need to add to the listed code for WHMCS to know whether or not a user is logged in outside of the WHMCS directory?

You would need to test for a valid whmcs session and if they are logged in using php instead.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated