For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

userdb

Access the Interchange user account facilities.

Summary

  • [userdb function]

Parameter Description Default
function The name of a user account facility to control with this tag. None
cgi Use the volatile $CGI space instead of the $Values space. No
db The database table to use. userdb
table Alias for db. userdb
hide Hide the result code No
nickname A name to use when loading or saving values using the address book, accounts book, saved carts and preferences facilities. None
name Alias for nickname. None

Various other parameters can be used to override defaults set using the UserDB local configuration directive.  See the Interchange user database page.

Examples

Tag usage example

This tag is usually called from within a mv_click or mv_check callback, as in the following:

<form action="[process]" method=POST>
    <input type="hidden" name="mv_session_id" value="[data session id]">

    Username: <input name="mv_username" SIZE="10" maxlength="20"><br>
    Password: <input name="mv_password" SIZE="10" maxlength="20">

    <input type="submit" name="mv_click" value="Login">
</form>

[set Login]
    mv_todo=return
    mv_nextpage=welcome
    [userdb function=login]
[/set]

Perl example

$Tag->userdb({
    function => $function
});

or similarly with positional parameters: 

$Tag->userdb($function, $attribute_hash_reference);

Description

This tag allows access to the Interchange user account facilities.

There are several default parameters that apply to any use of the [userdb] functions.  Most importantly, by default the database table name set to "userdb".  If you must use another table name, then you should include a "table=somename" parameter with any call to [userdb].

You may override any of the default settings, defined with the UserDB local configuration directive, by passing the appropriate setting name to the [userdb] tag.  For example:

[userdb userminlen=6 new_account=1]

See the UserDB page for a full list of default settings.  You should also see the Interchange user database page to learn more about Interchange's user database facility.

Parameters

function

The name of a user account facility to control with this tag.  See the User database functions list on the Interchange user database page for more information.

cgi

By default, the $Values space (i.e. [value foo]) is selected.  Use this parameter if you want to use the volatile $CGI space (i.e. [cgi foo]).

This is useful for access to values gathered on a HTML <form>.

db

This parameter allows you to use a different table for user information.  The default is userdb.

hide

The [userdb] tag will usually return a result code that can be used to determine whether the call succeeded or failed.  If this parameter is set true then the result code will be suppressed.

nickname

A name to use when loading or saving values using the address book, accounts book, saved carts and preferences facilities.  Nicknames should be unique within each facility, unless the intention is to update previously-set values.

See also

Category:  Interchange tags
Last modified by: Peter Ajamian
Modification date: Saturday 28 May 2016 at 1:11 AM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us