im having a problem with my custom login handler.
at the client I call the login method
Code: Select all
this.send( new LoginRequest(login, password, "twilightZone") );
but at the server when i try to get the User that sent the request
Code: Select all
public class LoginHandler extends BaseServerEventHandler
{
@Override
public void handleServerEvent(ISFSEvent event) throws SFSException
{
User user = (User) event.getParameter(SFSEventParam.USER);
...
}
}
I get a NULL user!
I even tried to get the user by session id, or by name, and i always get a NULL user..
what am i doing wrong?
(I need the user to join a room)
Code: Select all
ISFSApi sfs = SmartFoxServer.getInstance().getAPIManager().getSFSApi();
sfs.joinRoom(user, room);