Okay based on what you have given me. You don't want the user having to
download the app every time they log in so giving them a link somewhere is a
better idea (that way, they decide). Also you will want to add another value to
the Session variable for "userrole".
Now like i mentioned before you create another page called "downloadApp.cfm"
and in there you check your session variable to see whether a user is logged in
and whether they are admin users, like so.
//Code for login processing
<cfquery datasource="myDB" name="qryLogin">
SELECT username, userpassword, userrole
WHERE username = '#form.username#' and userpassword= '#form.userpassword#'
<cfif qryLogin.recordCount gt 0>
<font face="Arial, Helvetica, sans-serif" size="-1">Login successful. Welcome
<cfset SESSION.isLoggedIn ="yes">
<cfset SESSION.isUserAdmin = "yes">
<cfif "#qryLogin.userrole#" eq "0">
<a href="http://www.amysite.com/downloadApp.cfm">Download your app here</a>
Blah blah blah, you can't download.
<font face="Arial, Helvetica, sans-serif" size="-1" color="#990000">That
record does not exist. Please try again.
<cfif not isDefined ("SESSION.isLoggedIn")>
Please log in.<cfabort></cfif>
//code for downloadApp.cfm
<cfif SESSION.isLoggedIn EQ "yes" AND SESSION.isUserAdmin EQ "yes">
or if cfcontent doesn't work
You do not have access to download this file, what do you think you are doing.