Welcome!

Adobe Flex Authors: Matthew Lobas, PR.com Newswire, Shelly Palmer, Kevin Benedict

Related Topics: Adobe Flex, ColdFusion

Adobe Flex: Article

Building a Forum with Macromedia Dreamweaver From Adobe Part 2

User Authentication System

In Part 1 of this tutorial, we taught you how to pull information from a database in order to set up a forum front end and how to style it with CSS. In this article, you will see how easy it is to build a user authentication system for your forum.

Setting Up User Authentication
In the following sections of this tutorial, you will use ImpAKT to build a user authentication system for your forum. You need authentication to prevent pranksters from posting a load of garbage to your forum and getting away with it. If users want to post messages to the forum, they must register an account, activate it, and then log in. Only then will they be able to post messages to the forum.

To build the user authentication system, you will do the following:

  • Configure user login settings from the InterAKT Control Panel.
  • Create a user registration page.
  • Create the user login page.
  • Create a logout link.
  • Use conditional regions to control which content is public and which is private.
Configuring Login Settings
The InterAKT Control Panel (Figure 1) comes with your ImpAKT installation and is a central place for all configuration options for your site. The InterAKT Control Panel can be accessed from the MX Kollection tab of the Insert bar.

Alternatively, you can access the InterAKT Control Panel by clicking the Server Behaviors tab > MX Kollection submenu.

The InterAKT Control Panel offers a quick and convenient way to configure the most common settings for your development environment and for your site. Once configured, the settings will be remembered, thus saving you a lot of time.

Here are just a few of the settings you can configure with the InterAKT Control Panel:

  • Date formats: Change the date and time formats for the pages built with ImpAKT to match your specific regional settings (American, German, and so on).
  • Language settings: Change the language for form buttons, error messages, labels, and hints generated by ImpAKT. You can choose one of the predefined 11 languages.
  • Debugging mode: Configure the level of detail of error messages or set the error reporting method (errors can be sent by e-mail to the webmaster or logged to a file on the server).
  • Login settings: Configure the user authentication options.
  • E-mail settings: Configure the outgoing e-mail server, port, user name, and password.
  • CSS skins: Change the look of the entire site by selecting a different CSS skin.
  • User interface persistence and database caching: Enable these settings to speed up your work. If user interface persistence is enabled, all ImpAKT interfaces will remember the settings you entered the last time.
All ImpAKT interfaces feature contextual help - short instructions that guide you through configuring each setting.

In addition to these settings, you can also configure an image processing library, perform product upgrades, or update your site.

The Login Settings section is the place where you configure all user authentication options, including database information, password encryption, user levels, and redirect pages. Follow these steps to configure the login settings:

  • In the InterAKT Control Panel, click the Login Settings icon. This opens a dialog box showing four tabs: Options, Database, Session, and User Levels (Figure 2).
  • Configure the Options tab:
    For increased security, passwords will be encrypted in the database
    For this example, the forum will not use access levels, so set the restriction to use user name and password only
  • Leave the Auto Login Validity value at its default setting. Users will be able to automatically log in to the forum. They will be asked to authenticate again only if 30 days have passed since the last time they visited the forum.
  • In the Database tab, define which table stores the user information and what columns to use for authentication:
Select the database connection (connForum) and the table that stores user information (user_usr). The primary key is automatically detected and set to id_usr.
From the Username pop-up menu, select the name_usr column.
From the Password pop-up menu, select the password_usr column.
From the E-mail pop-up menu, select the email_usr column.
From the Active pop-up menu, select the active_usr column. If you specify a column that stores the account status (active/inactive), account activation will be available. When a user registers an account, an e-mail message will be sent containing an activation link. Unless the user clicks that link, the account cannot be used.

In the Random key pop-up menu, select the randomkey_usr column. A random key consists of a randomly generated set of alphanumeric characters used for improving website security. A random key is commonly used in user account activation, online purchases, or other activities that use URLs that ought to be difficult to guess. This prevents potentially malevolent users from accessing the URLs by directly entering them in the browser window in order to activate accounts for other users. ImpAKT automatically generates unique random keys for each user and stores them in the specified column.

  • In the Session tab, you can define which session variables to create upon login and what information to store in them. By default, two variables will be created: kt_login_id (stores the user's unique ID) and kt_login_user (stores the user name). You don't need additional session variables for this tutorial, so leave this tab as is.
  • Because the forum does not use access levels, you need to define on the User Levels tab only those pages to redirect the user to (Figure 3). You have to set the login page and the pages to be redirected to when authentication succeeds or fails. Use the login.php page from the site root for the Login Page and Default Redirect on Fail text boxes. When the login is successful, the user must be redirected to the forum home page.
  • Click OK to apply the changes and then click Close to exit the InterAKT Control Panel.
Because sending e-mail notifications for account activation is part of the user registration process, you will also need to configure the e-mail settings as explained in the following section.

Configuring E-mail Settings
Forum users will receive several automatic e-mail messages:

  • Account activation e-mail
  • Welcome message after activation
  • Password reminder e-mail
  • Topic reply notifications
This is why you need to set an outgoing e-mail server. You can configure e-mail settings from the InterAKT Control Panel by clicking the E-mail Settings section.

In the dialog box that opens, you can configure the following:

  • Outgoing server's name or IP address; if you are not sure about this, consult your network administrator
  • Port number (25 by default)
  • Username and password used to log in to the mail server (if required)
  • Default sender's e-mail address; this will appear in the From field in all message headers sent from the forum
Click OK to save the configuration, then click Close to exit the control panel. You have finished configuring user authentication for your site.

In the next section, you will build the user registration form.

More Stories By Marius Zaharia

Marius Zaharia is the documentation manager at InterAKT Online, a developer of professional tools for dynamic web development. When he's not writing articles and tutorials to guide web developers, he enjoys learning new things and exploring new technologies. His interests range from web development to politics and avantgarde electronic music.

More Stories By Cristian Ivascu

Cristian Ivascu is a technical writer with InterAKT Online. He is a strong supporter of open-source software and a fan of Japanese culture and rock music.

Comments (3) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Steve Kilpatrick 05/06/06 11:05:16 AM EDT

Hello, Where do I get part 1 of this tutuorial? Building a Forum with Macromedia Dreamweaver From Adobe Part 2 Thanks and keep up the good work!!

Steve Kilpatrick 05/06/06 11:04:46 AM EDT

Hello, Where do I get part 1 of this tutuorial? Building a Forum with Macromedia Dreamweaver From Adobe Part 2 Thanks and keep up the good work!!

SYS-CON Italy News Desk 02/24/06 02:49:08 PM EST

In Part 1 of this tutorial, we taught you how to pull information from a database in order to set up a forum front end and how to style it with CSS. In this article, you will see how easy it is to build a user authentication system for your forum.

IoT & Smart Cities Stories
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
The hierarchical architecture that distributes "compute" within the network specially at the edge can enable new services by harnessing emerging technologies. But Edge-Compute comes at increased cost that needs to be managed and potentially augmented by creative architecture solutions as there will always a catching-up with the capacity demands. Processing power in smartphones has enhanced YoY and there is increasingly spare compute capacity that can be potentially pooled. Uber has successfully ...
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...