{% unset_user %}

Removes custom properties from the user. This tag is meaningless if the user is not currently logged in.

Syntax

{% unset_user property1 [property2] [etc...] %}

You may also include reference variables, which will be dereferenced to their property names before unsetting the user properties.

There is no option to unset all properties from a user - properties must be individually removed.

Examples

{% if request.query_params.always_hide_the_money %}
    {% unset_user show_me_the_money %}
{% endif %}
{% if submission.is_valid and submission.score.value < 80 %}
    {% unset_user passed_certification_exam user_is_certified_for_x %}
{% endif %}
{% var props = request.query_params.clearprops | split: ',' %}
{% for prop in props %}
    {% unset_user &prop %}
{% endfor %}

Developer Overview

Liquid Markup