Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-13-2009, 08:49 AM   #1
ackerchez
Member
 
Join Date: Feb 2009
Posts: 64
Default user logout?

Hey All,

I am using a login system with Flex such that a user must log in before they can do anything in my app.

I am trying to research how to clear out the session on the side of the user when they log out of the system. I do not want them to be able to log in and see the same data that they had the first time.

For example, in the state after the login there are a couple of http service sends set for the creationcomplete event of the panel in the state. If a user logs out and then logs back in I don't see that the httpService send is happening again, I think that data from the previous send is loading because it is still in memory. Is there a way to clear this out to make sure that every time the user logs in he/she will do new httpService sends (and will therefore always be working off the most current data)?

Thanks,
ackerchez
ackerchez is offline   Reply With Quote
Old 07-17-2009, 04:16 PM   #2
IanAppleby
Registered User
 
Join Date: Feb 2009
Posts: 2
Default

The simplest approach is to call for a page reload when the logout button is pressed. Of course, that's not useful if the flex app is only part of the page.

If you need to clear everything, then you could maybe look into loading the main application swf into a wrapper swf, which can destroy and reload the file.
IanAppleby is offline   Reply With Quote
Old 07-17-2009, 06:12 PM   #3
cwaidelich
as3 and flash newby
 
Join Date: Oct 2008
Posts: 13
Default

Just a guess:

http://livedocs.adobe.com/flex/3/lan...#methodSummary

http://livedocs.adobe.com/flex/3/lan...e.html#cancel()

http://livedocs.adobe.com/flex/3/lan...l#clearResult()

Try it out, hope it helps.
cwaidelich is offline   Reply With Quote
Old 07-19-2009, 11:26 AM   #4
mdoubledragon
FlexCrazed
 
Join Date: Jul 2009
Posts: 3
Default

I am guessing your entire application is in Flex. In that case what you can do is to handle the "click" event of your login button so that after checking the user credentials, it calls a function. That function can contain the HTTPService send() calls that you are doing in creationComplete. Also the creationComplete can also call the same function.

Doing this you can ensure that whenever a user logs in, new data is loaded from the server.
mdoubledragon is offline   Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:23 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.