Placing the following in the onSessionEnd method should solve the  
problem:

<cfif getAuthUser() NEQ "">
<cflogout/>
</cfif>

Option B is to persist some cookie data which will re-login the user  
when the session ends.

As a side note, you can also use the <cflogin>  name to create a  
list.  The you can use the  getAuthUser() as a list and use that list  
to recreate the session structure:

<cflogin>
<cfloginuser name="#arguments.userid#,#arguments.username#"...

The you would use listFirst(getAuthUser()) to pull the userID and  
regenerate the user's session structure when it does not exist.

HTH,

Jon

On Oct 25, 2007, at 11:14 AM, Adalberto Gallardo wrote:

> hi,
> I have a bit of a problem, and I know that happens sometimes when  
> the sessi=
> on expires (and may be have something to do with the application  
> expiration=
> ).
> OK this is it:
> Every time I authenticate an user (this is made by an object  
> created in the=
>  session scope) I create a struct that contains all the user  
> information. T=
> his struct resides in the session scope and should be available  
> while the s=
> ession is active. When the user logout I delete this struct.  
> Everything wor=
> ks fine, but some times when the session expires and the user re- 
> login, the=
>  server do not run the authentication neither the login part of my  
> code. So=
>  I ended without my struct and with a logged in user.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292075
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to