Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.0

WebsydianExpress - Callback Point


UserValidateBeforeCreate

Type

Site specific callback point implemented by the user maintenance in the WebsydianExpress administration interface.

When is the callback point called

UserValidateBeforeCreate is called after the normal WebsydianExpress validation of the user in the administration interface has been performed successfully - and just before the user will be created.

Please note that this callback point are not called by the APIWebServer.UserCreate / APIWebServer.UserCreateValidation APIs. It is only an extension of the administration interface.

How does the callback point influence later functionality

If *Returned Status is not set to *Successful by one or more callback functions for this callback point, the user will not be created and an error message will be shown on the insert page.

You can specify up to 10 error messages by populating the field ErrorMessage in the local multi-occurrence variable CallbackErrorArray at the same time, you must specify the number of errors returned in the APIFields.NumberOfErrors in the local variable CallbackOutput.

Example of use

If you want to enforce special rules for the passwords that will be accepted, you can validate these rules in a callback function that is called by this callback point.

If the password is not valid, create a text explaining this put this text in the first occurrence of ErrorArray<ErrorMessage> and specifying 1 in CallbackOutput<APIFields.NumberOfErrors>.

Abstract callback function

Inherit from Callback.WebServer.UserValidateBeforeCreate.AbstractCallbackFunction to create a callback function that can be called by this callback point.

CallbackInput

This local variable contains:

These fields will be populated automatically by the callback function. Use the value of these fields as you would use normal input fields.

CallbackOutput

This local variable contains:

CallbackErrorArray

This multi-occurrence local variable contains:

You must populate the fields in CallbackOutput and CallbackErrorArray before the callback function is terminated.