get IP address inside USER_LOGOUT event handler

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
levancho
Posts: 71
Joined: 27 Jun 2011, 16:03

get IP address inside USER_LOGOUT event handler

Postby levancho » 31 Oct 2012, 17:05

Hi,

I am able to get ip address inside login event handler, since I have access to session, but in logout event handler i dont have access to (probobally already destroyed ) session, so is there a way to get IP address in user_logout event.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: get IP address inside USER_LOGOUT event handler

Postby rjgtav » 01 Nov 2012, 13:04

Hi,

In a USER_LOGOUT event, one of the parameters you get is the User object, which has a getSession() method which returns you a Session object, from where you can get the IP.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
levancho
Posts: 71
Joined: 27 Jun 2011, 16:03

Re: get IP address inside USER_LOGOUT event handler

Postby levancho » 01 Nov 2012, 17:16

thanks, a lot, :)

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Aldenea, DavinVicy, JerodSa, Jochanan, Keganniff, Kevengar and 16 guests