Storing and retrieving users
Posted: 29 Dec 2010, 06:03
I would like to store user's variables in our dabase. We are currently using an external user ID from facebook and when the user login we verify them against their stored uid and sig. everything works fines and i've been able to use the
addEventHandler(SFSEventType.USER_LOGIN, LoginEventHandler.class);
the client will provide LOGIN_NAME as facebook uid and LOGIN_PASSWORD as signature.
after the user succesfully login i will do
outData.putUtfString(SFSConstants.NEW_LOGIN_NAME, dbobject.getUtfString("name"));
to change their name to whatever we stored in our db.
the problem starts when the event
addEventHandler(SFSEventType.USER_JOIN_ZONE, UserJoinZoneEventHandler.class);
which is bascily where i would like to load all the user's variables. The problem is that when this event is fired i no longer have the facebook id to use.
any ideas how to add custom data so server can identify the user's id?
addEventHandler(SFSEventType.USER_LOGIN, LoginEventHandler.class);
the client will provide LOGIN_NAME as facebook uid and LOGIN_PASSWORD as signature.
after the user succesfully login i will do
outData.putUtfString(SFSConstants.NEW_LOGIN_NAME, dbobject.getUtfString("name"));
to change their name to whatever we stored in our db.
the problem starts when the event
addEventHandler(SFSEventType.USER_JOIN_ZONE, UserJoinZoneEventHandler.class);
which is bascily where i would like to load all the user's variables. The problem is that when this event is fired i no longer have the facebook id to use.
any ideas how to add custom data so server can identify the user's id?