CFLib.org – Common Function Library Project

DeleteClientVariables([safeList])

Last updated November 18, 2001

Version: 2 | Requires: ColdFusion 5 | Library: UtilityLib

 
Rated 0 time(s). Average Rating: 0

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:

view plain print about
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:

view plain print about
<cfscript>
/**
 * 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;
}
</cfscript>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Dave Anderson Dave Anderson added
iniToStruct
20 day(s) ago

Dave Anderson Dave Anderson added
deDupeArray
20 day(s) ago

Richard Richard added
dice
22 day(s) ago

Isaac Dealey Isaac Dealey added
getRelative
a while ago

Top Rated

Darwan Leonardo Sitepu backupDatabase
Rated 5.0, 22 time(s)

Barney Boisvert indentXml
Rated 5.0, 10 time(s)

Kevin Pepperman generateSsccAsn
Rated 5.0, 4 time(s)

Raymond Camden highlightAndCrop
Rated 5.0, 4 time(s)

Created by Raymond Camden / Design by Justin Johnson