{% unset_profile %}

Removes custom properties from the profile's attributes. This tag is meaningless unless the user is logged in.

Syntax

{% unset_profile
attribute_name
 
Include one or more attributes to remove
...
%}

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 attributes from a profile - attributes must be removed by name.

Examples

Unset Profile

Copy
{% if request.query_params.hide_the_money %} {% unset_profile show_me_the_money %} {% endif %}

Unset multiple Profile properties

Copy
{% if submission.is_valid and submission.score.value < 80 %} {% unset_profile passed_certification_exam user_is_certified_for_x %} {% endif %}

Unset Profile properties dynamically

Copy
{% var clearprops = request.query_params.clearprops | split: ',' | join:' ' %} {% if clearprops is_valid %} {% unset_profile *clearprops %} {% endif %}