private user variables
Posted: 04 Jan 2011, 07:44
I have 2 questions about UserVariables
1. I set vars to user on server side
This is working
Not working
Why second version not working?
2. Second question. How can I make private vars? not visible for other users only for owner, and do not throw variable_update_exception?
The only way is to use setProperty ?
1. I set vars to user on server side
Code: Select all
List<UserVariable> vars = new ArrayList<UserVariable>();
vars.add(new SFSUserVariable("money", 120));
vars.add(new SFSUserVariable("points", 3400));
smartfox.setUserVariables(user, vars);Code: Select all
smartfox.setUserVariables(user, vars);Code: Select all
try {
user.setVariables(vars);
}catch (SFSVariableException e) {}2. Second question. How can I make private vars? not visible for other users only for owner, and do not throw variable_update_exception?
The only way is to use setProperty ?