Class SignUpConfiguration
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfigures the options related to sending an email response, after a successful user registration.static final classConfigures the Password Recovery feature of the SignUp Assistant. -
Field Summary
FieldsModifier and TypeFieldDescription(Optional) The name of the field used to store the auto-generate activation code.int(Optional) If the activationCodeField is used this property will indicate the length of the activation hash code.booleanChecks that a user is not registering with an existing email address.booleanChecks that a user is not registering with an existing user name.(Optional) A custom Database Manager in case you don't want to use the default Zone's DB Manager.The name of the field used to store the user's email.Configure the automated email responsesfinal Map<SignUpErrorCodes, String> A map of customizable error messages associated with the the SignUpAssistant default error codes.(Optional) A list of other field names to be stored in the user account.The name of the field used as the main table Id.booleanDetermines whether or not an email address is mandatory for signing up.boolean(Debug Only) logs every SQL query for testing / debugging purposes.intMaximum length of the email field.intMaximum length of the user password.intMaximum length of the user name.intMinimum length of the user password.intMinimum length of the user name.The name of the field used to store the user password.Indicates how the password should be stored in the databaseConfigures the Password Recovery serviceADVANCEDADVANCEDThe name of the Database table used for storing the user registrations.(Optional) If the activationCodeField is used this property will indicate which field to use to keep track of the User's account activation.The name of the field used to store the user name. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
errorMessages
A map of customizable error messages associated with the the SignUpAssistant default error codes. Developers can customize their messages starting from the default templates provided.NOTE: It is important to maintain the same exact number of place holders ( %s ) in the translated messages so that parameters are correctly inserted at runtime. Failing to do this will cause unexpected runtime exceptions.
The CUSTOM_ERROR code can be used by pre/post process Plugins to throw custom errors.
Error code Default message MISSING_USERNAME User name is required USERNAME_TOO_SHORT User name is too short, min. amount of characters is %s USERNAME_TOO_LONG User name is too long, max. amount of characters is %s USERNAME_ALREADY_IN_USE Username: %s is already in use MISSING_PASSWORD Password is required PASSWORD_TOO_SHORT Password is too short, min. amount of characters is %s PASSWORD_TOO_LONG Password is too long, max. amount of characters is %s MISSING_EMAIL An email is required INVALID_EMAIL Email address: %s is invalid EMAIL_ALREADY_IN_USE Email address: %s is already in use RECOVER_NO_USER Password recovery error, username %s was not found ACTIVATION_NO_ID Invalid Activation. Session doesn't contain a database ID ACTIVATION_INVALID_CODE Invalid Activation Code received GENERIC_DB_ERROR Unexpected Database Error. Please contact our support CUSTOM_ERROR %s - See Also:
-
customDbManager
(Optional) A custom Database Manager in case you don't want to use the default Zone's DB Manager.- See Also:
-
signUpTable
The name of the Database table used for storing the user registrations. Default = 'users' -
idField
The name of the field used as the main table Id. The field is expected to be an auto-increment Int or Long. Default = 'id' -
usernameField
The name of the field used to store the user name. Default = 'username' -
passwordField
The name of the field used to store the user password. Default = 'password' -
emailField
The name of the field used to store the user's email. Default = 'email' -
passwordMode
Indicates how the password should be stored in the database- See Also:
-
activationCodeField
(Optional) The name of the field used to store the auto-generate activation code. Default = null.By setting this field the Activation process will generate a unique activation code that will be sent via email to the User. The client will be able to activate his account by providing the secret code. Without an activation the login will be forbidden.
See also: userIsActiveField
-
activationCodeLength
public int activationCodeLength(Optional) If the activationCodeField is used this property will indicate the length of the activation hash code. Default length = 32 -
userIsActiveField
(Optional) If the activationCodeField is used this property will indicate which field to use to keep track of the User's account activation. The required database field must be of string type and will contain a Y or N character to indicate the state of the activation. -
extraFields
(Optional) A list of other field names to be stored in the user account. Default is nullSupposing you specify three extra fields called "Country", "Avatar" and "Language" you will need to send those parameters from the client by using the same field names as the keys of the SFSObject sent to the Extension.
-
preProcessPlugin
ADVANCEDAllows developers to add and extra plugin class in the SignUp process to manipulate objects BEFORE the SignUp data is verified and stored in the database. This can be useful to add custom validations for extra fields or enforcing other signup rules.
Default is null (no pre-processing is done)
- See Also:
-
postProcessPlugin
ADVANCEDAllows developers to add and extra plugin class in the SignUp process to manipulate objects AFTER the SignUo data has been stored and before the client email is sent. This can be useful to add customizations to the email text or add extra parameters to the client's response object.
Default is null (no post-processing is done)
- See Also:
-
checkForDuplicateUserNames
public boolean checkForDuplicateUserNamesChecks that a user is not registering with an existing user name. Default = true -
checkForDuplicateEmails
public boolean checkForDuplicateEmailsChecks that a user is not registering with an existing email address. Default = true -
isEmailRequired
public boolean isEmailRequiredDetermines whether or not an email address is mandatory for signing up. Default = true -
emailResponse
Configure the automated email responses- See Also:
-
minUserNameLength
public int minUserNameLengthMinimum length of the user name. Default = 4 characters -
maxUserNameLength
public int maxUserNameLengthMaximum length of the user name. Default = 30 characters -
minPasswordLength
public int minPasswordLengthMinimum length of the user password. Default = 6 characters -
maxPasswordLength
public int maxPasswordLengthMaximum length of the user password. Default = 30 characters -
maxEmailLength
public int maxEmailLengthMaximum length of the email field. Default = 50 characters -
logSQL
public boolean logSQL(Debug Only) logs every SQL query for testing / debugging purposes. Never leave this turned on in production. Default = false -
passwordRecovery
Configures the Password Recovery service- See Also:
-
-
Constructor Details
-
SignUpConfiguration
public SignUpConfiguration()
-