[TOC] [Prev] [Next] [Bottom]

userKey, altuserKey

Local, application, domain and system scopes

Meta tags evaluated

These variables set the key used to identify users in Tango.

The value for this configuration variable may contain meta tags. The tags are substituted each time the variable is used by Tango Server.

User variables let you store values associated with a particular user of your Web site. These values can then be accessed in any application file. In order for user variables to work properly, Tango must be able to uniquely identify each user who accesses it. The World Wide Web and the protocol it uses (HTTP) do not make this easy.

For more information, see "Changing the userKey" in Chapter 8 of the User's Guide.

Tango gives you several options for specifying how Tango identifies each user. You need to choose the one that best suits your environment. You make this choice by assigning values to these configuration variables.

The userKey and altuserKey configuration variables tell Tango Server what piece(s) of information to use to identify a user when assigning to and evaluating user variables. The value of userKey is the default key for user variables. If its contents evaluate to empty, altUserKey is used instead.


! Note: If userKey contains a literal value, <@USERREFERENCE>, or any other meta tag guaranteed to return a value, then the value of altUserKey is irrelevant, as userKey will never be empty.


When you assign a value to userKey and altUserKey, you must tell Tango Server not to evaluate the content of the VALUE attribute, but instead to evaluate the meta tag when user variables need to be keyed. This is done with the <@LITERAL> meta tag.

For more information, see <@URL>.

The syntax of the assignment to userKey of its default value would be as follows:

<@ASSIGN NAME=userKey VALUE=<@LITERAL VALUE="<@APPKEY><@USERREFERENCE><@CGIPARAM CLIENT_IP>">

When you use <@VAR> to get the value of either of these configuration variables, the meta tags assigned to it are returned, not the values of those meta tags, because of the use of the <@LITERAL> meta tag. To get the actual value of the key, use the ENCODING=METAHTML formatting parameter in <@VAR>.

For more information, see Encoding Attribute.

For example, <@VAR NAME=userKey> might return <@APPKEY><@USERREFERENCE><@CGIPARAM CLIENT_IP>, indicating that user configuration variables are keyed on the Tango application, the Tango user reference ID assigned to each user, and the IP address the application file is being sent to. To get the actual value of the key for the current user, you would use <@VAR NAME=userKey ENCODING=METAHTML>, which would return the value of the string currently being used as the user key in the current application file (a 24-digit hexadecimal string).

The default value of userKey is <@APPKEY><@USERREFERENCE><@CGIPARAM CLIENT_IP>. The presence of the client IP address in the userKey ensures that a session cannot be "taken over" by someone from another IP address. The presence of <@APPKEY> in the key means that the same variable name can be used in different applications without conflicting.

The default value of altUserKey is empty.

See also

<@APPKEY>
<@CGIPARAM>
<@USERREFERENCE>
<@VAR>



[TOC] [Prev] [Next] [Bottom]

docs@pervasive.com
Copyright © 1999, Pervasive Software. All rights reserved.