{module_isloggedin}

Description

This module outputs in plain text "1" or "0" depending on whether somebody is logged in or not.

Syntax

{module_isloggedin collection="my_custom_collection_name" template=""}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

This module can be rendered:

  • in plain text
  • using Liquid collections - this is the Liquid output tag you can use - my_custom_collection_name.isLoggedIn

Examples

  • {module_isloggedin} - if somebody is logged in this displays "1". If nobody is logged in it displays "0"
  • {module_isloggedin collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection
  • the information whether the current site visitor is logged in or not contained in a Liquid global object. {{globals.user}} will output:
    {
      "firstname": "Michael",
      "lastname": "Smith",
      "fullname": "Michael Smith",
      "email": "Michael.Boston@gmail.com",
      "isLoggedIn": true
    }

Syntax

{module_isloggedin}

Examples

  • {module_isloggedin} - if somebody is logged in this displays "1". If nobody is logged in it displays "0".