ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old April 2nd, 2004, 04:34 AM
NightVa NightVa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 67 NightVa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 31 m 33 sec
Reputation Power: 5
Question GetAuthUser() is not persistent?

***Coldfusion MX 6.1 Question***

Anyone have an idea why my GetAuthUser() will have a value on one page but be empty on another page?

My login form does double duty by displaying the form THEN running a query once the form is submitted. After the query completes I use CFLOGIN to populate the GetAuthUser() function.

When I test for GetAuthUser() on the login form it works fine BUT when I see if the value was passed to a secondary page, it's empty. I thought GetAuthUser() was persistent during a single browser session?

Nathan
SYM EDGE Creative

Reply With Quote
  #2  
Old April 2nd, 2004, 12:53 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
I've been using CF for over 6 years and CFMX since it was in beta. And I have never gotten the whole CFLOGIN thing to work for me. Though I have not tried it in a while. I'd recommend looking at some examples and comparing to what you have to see if you're missing something. Take a look at:

http://www.bpurcell.org/blog/index....ntry&ENTRY=1008

Reply With Quote
  #3  
Old April 2nd, 2004, 04:58 PM
NightVa NightVa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 67 NightVa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 31 m 33 sec
Reputation Power: 5
Cool A real ANSWER to this question...

If your searching for an answer to my question...I've got it.

The CFLOGIN structure only works if all the login code is INSIDE THE APPLICATION.CFM template. Check this out, Application variables always persist whereas unless you pass variables using one of the three internal 'state' scopes (SESSION, APPLICATION, and CLIENT) each page of the site remains 'stateless'.

This was the root of the problem I was having. I had the CFLOGIN code OUTSIDE the Application template so the value of GetAuthUser() was disappearing between the two pages but was available to the SAME PAGE THAT FILLED IN THE variable.

So, i created an INCLUDE file that was called by the Application.cfm template. It then ran the CFIF blocks that checked FORM variables and ran the query. Once that completed, the LOGINUSER tag was used to populate the GetAuthUser() function WHILE IT WAS INCLUDED IN THE APPLICATION template. Grrrr...this kind of stuff should be well know...

I hope this helped someone out and thanks for the replies.

Nathan
SYM EDGE Creative

Reply With Quote
  #4  
Old April 5th, 2004, 08:54 AM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
Actually, I think it is not so much that CFLOGIN must be in the application.cfm file, but that CFLOGIN must be encountered SOMEWHERE prior to you calling any functions like getAuthUser(). It's just very easy to do this by putting CFLOGIN in the application.cfm file. I think if you wanted to you could avoid using application.cfm and instead have a framework like Fusebox or Mach-II which has preprocess plugin phases that behave much like application.cfm. I'm not 100% sure but I am pretty sure that this is the case, just to clarify. Glad you figured out the issue anyway.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > GetAuthUser() is not persistent?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway