UnsetAllUsersVar

Unset a user variable for **all** users

Signature

public void UnsetAllUsersVar(string varName, bool persisted = true)

Parameters

varName
string required

The string name of the global variable

persisted
bool
Default:
True

To get, set, or unset persisted global variables, set to true or leave empty.

To get, set, or unset temporary/non-persisted global variables, set to false.

Return Type

void

Example

using System;
public class CPHInline
{
    public bool Execute()
    {
        //Please be extremely careful with this method
        //Only possible to restore with back-up

        //Unset all(!) persisted user variable called "myString"
        CPH.UnsetAllUsersVar("myString");         CPH.UnsetAllUsersVar("myString", true); 
        //Unset all(!) non-persisted user variable called "myString"
        CPH.UnsetAllUsersVar("myString", false);         return true;
    }
}