Hazel Docs: Plugins: Members

Introduction

The members plugin enables member accounts on your Hazel system. When a user is authenticated via login to an account, the information they enter for their current order is saved so that it can be recalled when they later return to your catalog.

The members plugin adds these actions to your Hazel:

birth
Create a member account.
login
Login to an existing member account.
chpass
Change the password of a member account.
chname
Change the primary alias of a member account.
repass
Send the current password of a member account to its registered email address.
suicide
Delete ones own member account.
logout
Logout from an existing member account.

Installation

Netsville will have sent you a package containing the plugin itself. Create a hazel-cgi/plugins directory (that is, a plugins directory inside the directory containing your current hazel.cgi) and upload the plugin (a file ending in .so) there.

Create a hazel-cat/members directory. All of your member dossiers will be stored below this directory structure.

Create the following templates. Click on each for a standard example which you can upload as a starting point.

All but the member_dossier.txt have internal defaults (the html files will use your standard error template if a custom file does not exist.) Your member_dossier.txt should simply define what NAME:%HZML_VALUE fields you wish to be stored in the member's dossier file. If you wanted to save everything a customer entered during a session, your member_dossier.txt could just contain a dump loop:

<Hazel-Loop Type="Dump" Root="SHOPPER">
%HZH_DUMP_KEY:%HZH_DUMP_VAL
</Hazel-Loop>

Configuration

The following hazel.config fields are used by the members plugin. You can copy all of them and paste into the bottom of your hazel.config if you like, editing them if necessary. (The defaults are reasonable.)

## Subject of the action=BIRTH email.
#MEMBER_BIRTH_SUBJECT:Welcome to %HZM_STORE_NAME!

## Subject of the action=CHPASS email.
#MEMBER_CHPASS_SUBJECT:New %HZM_STORE_NAME Password

## Subject of the action=CHNAME email.
#MEMBER_CHNAME_SUBJECT:New %HZM_STORE_NAME Username

## Subject of the action=SUICIDE email.
## If omitted or false, no email is sent upon user account deletion.
#MEMBER_SUICIDE_SUBJECT:%HZM_STORE_NAME Account Deleted

## Valid characters in a username.  By default, these are all
## alphanumerics, plus "@._-".  Best to leave it alone.
#MEMBER_USERNAME_CHARS:

## Minimum length for a new/changed password.
#MEMBER_PASSWORD_MINLEN:5

## If MEMBER_REMEMBER_FORGOTTEN is true, allow Hazel to send existing
## passwords to the registeredemail address of those who've forgotten them.
#MEMBER_REMEMBER_FORGOTTEN:0

## If MEMBER_CHPASS_ALLOW_AUTHED is true, Hazel does not require an
## /authenticated/ member to enter username and password when changing
## their password.
#MEMBER_CHPASS_ALLOW_AUTHED:0

## If MEMBER_USERNAME_IS_EMAIL is true, then MEMBER_EMAIL is kept in
## sync with MEMBER_USERNAME, and MEMBER_USERNAME is required to be
## formed as a valid internet email address.
#MEMBER_USERNAME_IS_EMAIL:0

Try it!

To begin, just send your Hazel an action=birth (eg. enter a URL such as http://yourdomain/cgi-bin/hazel.cgi?action=birth), and follow the directions to create an account.

To make it slightly easier, you can install the following template into your hazel-doc directory (wherever Hazel looks for HTML files to serve), and just serve it through Hazel. You can customize it as a general "Account Info" page for your users.

If you serve that page through your Hazel (eg. enter a URL such as http://yourdomain/cgi-bin/hazel.cgi?action=serve&item=members.html), you'll have a pretty little display of the major member functions.

Trouble?

If you receive errors such as "unknown Hazel action", then the plugin may not be installed correctly. Send your Hazel an action=showreg. The plugin should appear near the bottom, along with its internal version-id and build date.

If you don't see it, it might be time to call Netsville. We'll be glad to help you get it running.


Getting Started HZML Rules Extras Advanced Reference
Download
Walkthrough
Configuration
The Products File
Order Reporting
Upgrading
Known Problems
Actions
HZML Tokens
HZML Tags
HZML Loops
HZML & HAM
Overview
Shipping
Sales Tax
Discounts
Surcharges
Tweaking
Customization
Input Fields
Softgoods
Search Engine
Optioned Products
Plugins
Design Tips
Themes
Currency
Payment Methods
Coupons
Regular Expressions
Perl API
hazel.config
Templates
HTML Basics
CGI and You
ChangeLog

Hazel Home - Help Contents - Searchable Knowledge Base - Live Technical Support