Tutorial: User Authentication

By following this tutorial, you will use the wizards and server behaviors from MX User Login to create a secured area for a job site. The tutorial can also be used for any other similar application that has restricted access areas.

The job site has two secured areas: one for job applicants and the other for companies seeking a candidate.

 

Before starting this tutorial, please configure the Login Settings of your site from the InterAKT Control Panel, accessible from the Insert bar -> MX Kollection tab.

First, configure the Options tab as shown below:

 

  1. The passwords will be encrypted in the database for both companies and users.
  2. In order to login to the site, both users and companies will use an username and a password. Also, they will need to have a certain user level.
  3. The default auto-login validity period (the Remember Me feature) is set to 30 days.

Second, configure the Database tab:

 

Note: If you do not select a table field to store the active status in the Active drop-down menu, the Use activation checkbox that determines the use of activation will not be available, and you will not be able to use this feature.

As you can see, we set the User name to be the email_usr in order to show that the e-mail address should be unique (you cannot have two users with the same e-mail address).

Note: The user name table column must be configured as an unique key . Otherwise, the login will not work, an error message stating that more than one user was found being displayed.

Leave the Session tab settings as they are and then configure the User Levels tab:

 

We decided to use user levels so first configure the User level information:

  1. Click on the Plus (+) button to add a new user level and set:
    · Level: 1.
    · Redirect on success: company/index.
    · Redirect on fail: login.
    So, the companies will have user level 1 and if they succeed on logging in they are redirected to the company/index page, else they go to login.
  2. Make the same settings for users - which will have Level: 0.
  3. In the user redirect pages section browse for the indicated pages. If there will be users not having one of the two defined levels, they will be redirected to those pages.

In order to be able to follow the User Authentication section of this tutorial, please create the following structure:

 

If you have the MX Kollection 3 bundle installed, then you have all the needed tools. Otherwise, the following separate products should be installed on your computer in order to complete this tutorial section:

The estimated completion time for this section is about 25 - 40 minutes. It depends on your authoring knowledge with Macromedia Dreamweaver (MX or MX 2004) and MX Kollection 3.

 

This section contains the following topics: