Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started
by Ben Forta, Raymond Camden, Charlie Arehart
Personalizing Based on Login
After Listings 23.1–23.3 are in place, the SESSION.auth structure is guaranteed to exist for all your application’s pages. What’s more, the user’s unique ID and first name will be available as SESSION.auth.contactID and SESSION.auth.firstName, respectively. This makes providing users with personalized pages, such as Manage My Account or My Order History, easy.
Listing 23.4 shows a template called OrderHistory.cfm, which lets a user review the merchandise orders they have placed in the past. Because the authenticated contactID is readily available, doing this in a reasonably secure fashion is easy. In most respects, this is just a data-display template, the likes of which you learned about in Chapter 10, “Creating ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access