CFLib.org – Common Function Library Project

DeleteClientVariables([safeList])

Last updated November 19, 2001

author

Bernd VanSkiver

Version: 2 | Requires: CF5 | Library: UtilityLib

Description:
This function deletes all client variables for a user. An optional list can be passed to ignore certain client variables.

Return Values:
Returns true.

Example:

No example for this code since we do not use client variables on cflib.org.

Parameters:

Name Description Required
safeList A list of client vars to NOT delete. No

Full UDF Source:

/**
 * This function deletes all client variables for a user.
 * Version 2 mods by Tony Petruzzi
 * 
 * @param safeList      A list of client vars to NOT delete. 
 * @return Returns true. 
 * @author Bernd VanSkiver (bernd@shadowdesign.net) 
 * @version 2, January 29, 2002 
 */
function DeleteClientVariables() {
    var ClientVarList = GetClientVariablesList();
    var safeList = "";
    var i = 1;

    if(ArrayLen(Arguments) gte 1) safeList = Arguments[1];

    for(i=1; i lte listLen(ClientVarList); i=i+1) {
        if(NOT ListFindNoCase(safeList, ListGetAt(ClientVarList, i )))  DeleteClientVariable(ListGetAt(ClientVarList, i));
    }
    return true;
}

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson