Change user account

In order to allow registered users (regardless of their access level) change account information (e.g. the e-mail address and the password), a page containing an update transaction must be built. For this tutorial, there are two of these pages, one in the company folder, and one in the user folder. The creation method is the same for both, with only minor differences, that will be highlighted.

To build the account update page, follow the next steps:

  1. Open the company/update_account page in Dreamweaver.

  2. Apply the Update Record Form Wizard from the MX Kollection tab of the Insert panel.

  3. Configure the dialog box as follows:

  4. Save the page and preview it in the browser.


     

  5. As you can see, all required password fields are displayed in order to ensure a correct update.

 

Aside the generation of new password fields, the update wizard added several server behaviors: The Check Old Password Trigger and the Throw Error trigger. The first checks if the entered old password is correct, while the second verifies if the two new passwords match.

 

The same steps must be followed for the user/update_account page. There is no difference in the page construction, but only in the restrict access to page code added through the Restrict Access To Folder command. This is necessary, as the update transaction uses the user ID stored in a session variable.