http://docs2x.smartfoxserver.com/Extens ... activation
In one of the examples, under the "Custom Email Fields" section, it uses the variable "age" without referencing it anywhere. I originally thought maybe it's coming from the params variable, but it looks like params is for sending data back to the client. Do you know how I can access this information to check here?
Thanks,
Andy
Code from the website (age is used in the if statement without being referenced anywhere earlier):
Code: Select all
private final class MyPostProcessPlugin implements ISignUpAssistantPlugin
{
private final String zoneName;
public MyPostProcessPlugin(String zoneName)
{
this.zoneName = zoneName;
}
@Override
public void execute(User user, ISFSObject params, SignUpConfiguration config) throws SignUpValidationException
{
// By default we just insert a line break
String message = "<br />";
// If age below 18 we show a message
if (age < 18)
message = "<p>Since your age is below 18, in-game purchases will not be available</p>";
Map<String, String> customMailFields = new HashMap<String, String>();
customMailFields.put("${ageComment}", message);
customMailFields.put("${gameWelcome}", "Welcome to the " + zoneName + " game.");
// Pass the new fields to the Component's configuration
config.emailResponse.customEmailFields = customMailFields;
}
}