Data handler (CustomDataHandler class) |
This handler allows you to add custom actions to the following events:
The events are applied to all data items that are stored to the database. It includes documents, user information or any other settings. They receive the data object of type DataClass that can be modified. In case of delete handlers, the class name and ID is provided.
Example
The following example shows how to handle the OnAfterUpdate event and send the password to the user whenever her profile is updated:
[C#]
[C#]
Please note: getting user's password in the example above is only possible when passwords are stored in Plain text format; the setting is located in Site Manager -> Settings -> Security.
4. If you don't have refference to CMS.EmailEngine in your CustomEventHandler, add it there. 5. Compile and run the project. Edit some user profile that uses your e-mail address. You should receive the e-mail message with your password.
|