I've been trying to make my app establish a user session. I put my user
validation code in my controller's prefuseaction:
<!--- authenticate against the AD --->
<cfntauthenticate username="#theusername#" password="#thepassword#"
domain="#thedomain#" result="authresult" listgroups="no">
<cfif authresult.auth>
<!--- check to see if the authenticated user exists in the
database --->
<cfquery name="getUserInfo" datasource="foo">
select role from v_users where oprid = '#theusername#' and
isInactive is null;
</cfquery>
<cfif getUserInfo.recordcount gt 0>
<cfloginuser name="#theusername#" password="#thepassword#"
roles="#getUserInfo.role#">
<cfset session.username = GetAuthUser() >
<cfset session.userrole = GetUserRoles() >
</cfif>
</cfif>
That doesn't seem to work - when I do a debug cfoutput in my welcome view:
<cfoutput>#GetAuthUser()# / #len(session.username)#</cfoutput>
I get a username for my first value but a zero for my 2nd. Ideas?
tia,
- Joe
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320560
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4