set uservariable in loginEventHandler
set uservariable in loginEventHandler
Hi , I wrote an extension that has Custom Login Handler , after I query my db by use of dbmanager in LoginEventHandler I have some result for this user from db , I have to save some of the result column in uservariable but in LoginEventhandler phase we do not have a real user , how we can transfer this result data to zonejoinHandler so after user creates we can set it's userVariable .
Re: set uservariable in loginEventHandler
Hello,
you can store the data to be later saved into UserVariables in the session object that is passed to the Login handler.
The session object has a getProperty(key) and a setProperty(key, value) methods.
When the User has finally entered the system you will receive the USER_JOIN_ZONE event which will provide the User object, this time.
From there you go:
... and proceed with setting the User Variables.
Hope it helps
you can store the data to be later saved into UserVariables in the session object that is passed to the Login handler.
The session object has a getProperty(key) and a setProperty(key, value) methods.
When the User has finally entered the system you will receive the USER_JOIN_ZONE event which will provide the User object, this time.
From there you go:
Code: Select all
user.getSession().getProperty(...)
... and proceed with setting the User Variables.
Hope it helps
Re: set uservariable in loginEventHandler
thx Lapo it works now
Who is online
Users browsing this forum: No registered users and 58 guests