Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 

Update Passwords for Websydian Versions 2.0, 2.1, and 2.5 - Windows


Introduction

To implement the 'update at login' solution for Websydian 2.0, 2.1, and 2.5 for the Windows platform the steps in the following sections must be applied.

In the example the implemented user management pattern is named AcmeUserControl. All references to AcmeUserControl should be replaced with the name of your user management pattern.

Function WebLoginPage.Login

This function should be modified so it generates a new password signature for users whose password signature has not been updated.

Add the triples displayed in the table below to the WebLoginPage.Login function:

AcmeUserControl.Service.WebLoginPage.Login local FLD
...for
WSYUSER/Password
OBJECTS/Local
local FLD
...for
MyLastLogin
OBJECTS/Local
local FLD
...for
WSYBASE/FieldsToSignature
OBJECTS/Local
local FLD
...for
WSYBASE/Signature
OBJECTS/Local
MyLastLogin is a FLD WSYUSER/LastLogin
value VAL DeploymentDate
impl name NME mylogin

Insert the following code into the pre point Start validate password in the function WebLoginPage.Login:

Call AcmeUserControl.Data.User.Fetch.SingleFetch

// Map with WebInput<UserLoginName>

If AcmeUserControl.Data.User.Fetch.SingleFetch/FetchedData<LastLogin>
        << <MyLastLogin.DeploymentDate>

  Cast Local<FieldsToSignature>, WebInput<Password.PasswordDisplayed>

  API Call Source code: WSYINTEG/_OldObjects.MD2 Algorithm

Map with Local<Signature>
         Local<FieldsToSignature>

  Cast Local<Password>, Local<Signature>

  if Local<Password> ==
        AcmeUserControl.Data.User.Fetch.SingleFetch/FetchedData<Password>

    Call AcmeUserControl.Data.User.Update.UpdateRow

// Map with output from AcmeUserControl.Data.User.Fetch.SingleFetch

// - except for Password that is mapped with WebInput<Password>

The literal value of the value object <MyLastLogin.DeploymentDate> should contain the timestamp for when the MD2 update was deployed. The format of the literal value is 'yyyy/mm/dd hh:mm:ss'.

Generate and build the function AcmeUserControl.Service.WebLoginPage.Login.