Frank,

You are not imagining things. I had some cflogin code that I had written
during Beta test that worked just fine. I went to use it again last night on
a release version of CFMX and it does not work anymore. CF does not seem to
remember the login info from one page to the next. It logs the user in just
fine, but when they go to a new page all the login variables are gone.

If you find an answer let me know, I will do the same.

Barry

-----Original Message-----
From: Frank Mamone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 24 July 2002 3:48 AM
To: CF-Talk
Subject: CFLOGIN Problems


I am trying out the functionality of the CFLOGIN tsg snf it doesn't seem to
work as advertised.

According to the docs "Code in thr cflogin tag only executes if there is no
user is logged in".

The system authenticates and displays the protected page but when accessing
another page in the same dir the same code re-executes and doesn't see the
form login vars and boots me to the login page. 

Am I missing something? Here is part of the code in Application.cfm:

Thank you all.

<cfset AllowedRoles = "Domain Users"> 
 
<cflogin>
 <cfif isdefined("form.password") and isdefined("form.username")>
 
  <!--- WE NEED TO PROVIDE THIS SOMEHOW. SIMILAR TO NT LOGIN WOULD DO. --->
  <CFSET Request.myDomain = "STS1">
  <!--- TRY TO AUTHENTICATE USER --->
  <cfinvoke
  component = "NTSecurity"
  method = "authenticateUser"
  domain = "#Request.myDomain#"
  userid = "#form.username#"
  passwd = "#form.password#"
  returnVariable = "Auth"> 
  
  <cfif #Auth# IS "True">
  <!--- SUCCESS --->
  <cfset failed = "no"> 
  <!---NOW LET'S CHECK WHAT GROUPS(roles) I HAVE --->     
  <cfinvoke
  component = "NTSecurity"
  method = "getUserGroups"
  domain = "#Request.myDomain#"
  userid = "#form.username#"
  passwd = "#form.password#"
  returnVariable = "MyGroups"> 
        
  <cfoutput>
  <CFSET TheRoles ="#Replace('#MyGroups#',', ',',','All')#">
  </cfoutput>
  
<cfloginuser name="#form.username#"
  password="#form.password#"
  roles="#TheRoles#"
     > 
  <CFELSE>
 
 <!----Did not pass authentication so redirect with message--->

  <cfset message = "There was a problem with your login.">
  <cflocation
url="../../#LOGINPATH#?url=#cgi.script_name#&#cgi.query_string#&message=#mes
sage#" addtoken="no">
  </CFIF>
  
   
 
 <CFELSE>
 <!---No FORM login vars so redirect to login page --->    
 <cfset message = ""> 
 <cflocation
url="../../#LOGINPATH#?url=#cgi.script_name#&#cgi.query_string#&message=#mes
sage#" addtoken="no"> 
 
 
 </CFIF>
<cflogin>


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to