Re: cflogout problem
If you aren't using session cookies the session of the user won't be expired if they simply close the browser since the default expiration of cookies is something like 2037. You can check this by looking for the cookies on your machine. To change the normal cookies into session cookies (ones that expire as soon as the browser is closed) do the following: When setting up your application make sure you have SETCLIENTCOOKIES=NO Then on session start cfif not IsDefined(Cookie.CFID) CFLOCK SCOPE=SESSION TYPE=READONLY TIMEOUT=5 CFCOOKIE NAME=CFID VALUE=#SESSION.CFID# CFCOOKIE NAME=CFTOKEN VALUE=#SESSION.CFTOKEN# /CFLOCK /cfif or switch to using J2EE sessions which automatically destroys the jsessionid when the browser is closed. -- Gary Gilbert http://www.garyrgilbert.com/blog ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293118 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cflogout problem
hi gary thanks for the reply. i tried what you said but for some strange reason it is dumping all the session variables when the browser closes but then when i restart the browser and start again, all the session variables are gone but it is not entering the cflogin tag indicating that it is not logging the user out. i have enabled the j2ee session variables in the administrator but it is strange that it is dumping the session variables but doesnt seem to be logging the user out. the only way i can get it to enter the cflogin tag is to physically click the logout button then it is fine. i have even tried to put the cflogout tag inside the onsessionend event and this problem still occurs thanks for your help ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293150 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cflogout problem
I have also just noticed that when the session times out, the user is directed back to the login page but when i attempt to log back in it doesn't enter the cflogin tag, again it only does if i click the logout button this is very strange, i would appreciate any advice as i cant work out what this is thanks very much ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293151 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cflogout problem
I have also just noticed that when the session times out, the user is directed back to the login page but when i attempt to log back in it doesn't enter the cflogin tag, again it only does if i click the logout button Do you have CFLOGIN associated with your session, or is it using a separate cookie (the default)? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293166 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cflogout problem
Hi Would someone be able to provide me with a simple example of how the cflogin works in the application.cfc i used the example in the coldfusion livedocs but encountering this problem so would like to double check it to see what is missing thanks very much Richard ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293167 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cflogout problem
Do you have CFLOGIN associated with your session, or is it using a separate cookie (the default)? Hi Dave, I have it associated with the session in the application.cfc with the following code: cfset This.loginstorage=session Thanks ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293170 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cflogout problem
If i dump the session variable should i see the login details? i.e. the username, password, and roles? as i am not seeing them when i dump the session variables ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293172 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cflogout problem
Hi, i have the cflogin page set up on the application.cfc page as it is in coldfusion livedocs. i have a logout button on each page - when the user clicks the button it goes to a page to set a session variable logoutrequested and sends the user back to the login page. the application.cfc page then detects this session variable and logs out the user. this is the current code to logout the user: !--- If the user logs out then the session.logoutRequested will be defined which is set in the logout actionpage. The following cflogin tag runs as a result. --- cfif IsDefined(session.logoutRequested) cfset structdelete(session, logoutRequested) cflogout /cfif this works fine - once logged out the user can log back in fine. However, i have noticed that if the user closes the browser instead of logging out in the way shown above then when i restart the browser and try to log on, it doesnt log the user on correctly as it doesnt seem to enter the cflogin tag. hope this makes sense.. just wondering what is causing this and how i could get round it. i have tried creating an onSessionEnd function in the application.cfc with the cflogout tag but that isnt working either Thanks for your help Richard ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293092 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFLOGOUT Problem Persists
Is the logout file also outside the directory that has application.cfc? On 8/9/06, Lewis Billingsley [EMAIL PROTECTED] wrote: Grantee_Login2.cfm is a duplicate of the login form. I don't remember why I used a duplicate, but the original login is outside the directory that has application.cfc, which includes forceuserlogin.cfm, which has the cflogin Here is the code to the original login: -- CFAJAX docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249312 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOGOUT Problem Persists
Yes. Is the logout file also outside the directory that has application. cfc? On 8/9/06, Lewis Billingsley [EMAIL PROTECTED] wrote: Grantee_Login2.cfm is a duplicate of the login form. I don't remember why I used a duplicate, but the original login is outside the directory that has application.cfc, which includes forceuserlogin.cfm, which has the cflogin Here is the code to the original login: -- CFAJAX docs and other useful articles: http://www.bifrost.com. au/blog/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249330 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOGOUT Problem Persists
Ok, I put the logout file inside the directory that had application.cfm (with forceuserlogin.cfm, and therefore the login framework). It works. Yes. Little thing like that; I should have tried it. Of course. Obviously, it needs to be in the same directory as the login framwork. Maybe I thought it wouldn't make a difference because the login framework was somehow tied to the session scope. I get the feeling that it is and it isn't. Anyway, it works. And I am very thankful. This has been making me crazy. One more thing: Is there a way to stay logged out when I hit the back button? Yes. au/blog/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249338 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOGOUT Problem Persists
I knew it would be something as simple as this. The logout needs to be inside the directory with Application.cfc because you specify the loginstorage in Application.cfc. In there it specifies session, but if the logout is outside that folder, Application.cfc doesn't run and the loginstorage defaults to cookie. So the logout looks in a different place and can't find it. As for the back button, you need to stop the browser from caching pages by using cfheader tags to set immediate expiry, no-cache etc. This has been discussed recently on the list. On 8/10/06, Lewis Billingsley [EMAIL PROTECTED] wrote: Ok, I put the logout file inside the directory that had application.cfm (with forceuserlogin.cfm, and therefore the login framework). It works. Yes. Little thing like that; I should have tried it. Of course. Obviously, it needs to be in the same directory as the login framwork. Maybe I thought it wouldn't make a difference because the login framework was somehow tied to the session scope. I get the feeling that it is and it isn't. Anyway, it works. And I am very thankful. This has been making me crazy. One more thing: Is there a way to stay logged out when I hit the back button? Yes. au/blog/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249391 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOGOUT Problem Persists
While it won't help fix the cflogout issue, this also needs fixing: CFLOGIN idletimeout=#CreateTimeSpan(0,0,20,0)# cflogin takes a number of seconds as an idletimeout, not a timespan. As for the original problem, something is really broken here and any fudge (e.g. setting a username to ) is hiding some deeper issue. Can you post the entire contents of Grantee_Login2.cfm? On 8/9/06, Lewis Billingsley [EMAIL PROTECTED] wrote: I still can't get the CFLOGOUT tag to work. Below is the code for my application.cfc file. Below that is the CFLOGIN code in the ForceUserLogin.cfm file that is included in every file in the application. The login works fine. The logout does not. Someone suggested that I just have the logout process set the session username/authorization to , but I don't know what syntax to use to do that. Please help. Thanks. Application.cfc cfcomponent output=false cfset this.name=MSFWGrantees cfset this.sessionManagement=True cfset this.loginstorage=Session cfset this.sessiontimeout=createtimespan(0,8,0,0) cffunction name=onRequestStart returntype=boolean output=true cfset REQUEST.datasource=wdsc !--- Check to see if the user is logged in, if not force them to now --- cfinclude template=ForceUserLogin.cfm cfreturn true /cffunction /cfcomponent CFLOGIN idletimeout=#CreateTimeSpan(0,0,20,0)# cfif NOT (IsDefined(Form.username) AND IsDefined(Form.Password)) cfinclude TEMPLATE=Grantee_Login2.cfm cfabort CFELSE cfquery name = GetUser datasource=wdsc SELECT UserID, FirstName, Rights, Password FROM MSFW_Passwords WHERE UserName = '#FORM.UserName#' AND Password = '#FORM.Password#' /cfquery cfif GetUser.REcordCount EQ 1 cfloginuser name=#GetUser.UserID#, #GetUser.FirstName# password=#FORM.password# roles=#GetUser.Rights# cfelse strongSorry, that user name and password are not recognized. Please try again./strong cfinclude template=Grantee_Login2.cfm cfabort /CFIF /cfif /CFLOGIN ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249253 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4