VOOZH about

URL: https://manpages.org/userdbpm/3

⇱ man UserDB.pm (3): Interchange User Database Functions


UserDB.pm(3) Interchange User Database Functions

SYNOPSIS

userdb ,

DESCRIPTION

The Interchange user database saves information for users, including shipping, billing, and preference information. It allows the user to return to a previous session without the requirement for a ``cookie'' or other persistent session information.

It is object-oriented and called via the [userdb] usertag, which calls the userdb subroutine.

It restores and manipulates the form values normally stored in the user session values --- the ones set in forms and read through the tags. A special function allows saving of shopping cart contents.

The preference, billing, and shipping information is keyed so that different sets of information may be saved, providing and ``address_book'' function that can save more than one shipping and/or billing address. The set to restore is selected by the form values , , and .

METHODS

User login:
 $obj->login(); # Form values are
 # mv_username, mv_password

Create account:

 $obj->new_account(); # Form values are
 # mv_username, mv_password, mv_verify

Change password:

 $obj->change_pass(); # Form values are
 # mv_username, mv_password_old, mv_password, mv_verify(new)

Get, set user information:

 $obj->get_values();
 $obj->set_values();
 $obj->clear_values();

Save, restore filed user information:

 $obj->get_shipping();
 $obj->set_shipping();
 $obj->get_billing();
 $obj->set_billing();
 $obj->get_preferences();
 $obj->set_preferences();
 $obj->get_cart();
 $obj->set_cart();

Shipping Address Book

The shipping address book saves information relevant to shipping the order. In its simplest form, this can be the only address book needed. By default these form values are included:
 s_nickname
 name
 address
 city
 state
 zip
 country
 phone_day
 mv_shipmode

The values are saved with the ->set_shipping() method and restored with ->get_shipping. A list of the keys available is kept in the form value , suitable for iteration in an select box or in a set of links.

Accounts Book

The accounts book saves information relevant to billing the order. By default these form values are included:
 b_nickname
 b_name
 b_address
 b_city
 b_state
 b_zip
 b_country
 b_phone
 mv_credit_card_type
 mv_credit_card_exp_month
 mv_credit_card_exp_year
 mv_credit_card_reference

The values are saved with the ->set_billing() method and restored with ->get_billing. A list of the keys available is kept in the form value , suitable for iteration in an select box or in a set of links.

Preferences

Preferences are miscellaneous session information. They include by default the fields , , , and . The field acts as a key to select the preference set.

Locations

There are several database locations that have special purposes. These fields are not saved as user values.
default: username

The username or key field of the database table.
default: accounts

Billing address hash field.
default: address_book

Shipping address hash field.
default: preferences

Miscellaneous information hash field.
default: feedback

Customer feedback hash field.
default: price_level

Customer pricing level marker.
default: carts

Saved carts hash field.
default: password

Customer password info. If is set, may be encrypted.
default: mod_time

Last login time
default: expiration

Expiration of account.
default: (none)

Key information for linking to another table of address or other info.
default: groups

Groups they should be logged into.
default: super

Whether they are a superuser (admin).
default: acl

default: file_acl

default: db_acl

Location of access control information.
default: (none)

default: (none)

default: (none)

default: (none)

Date fields.
default: (none)

The user id of another account this was merged into. If present, and data (should be a valid user id) is present in the field, the user will be logged as that username.