Online documentation - Websydian v6.5 |
To implement the 'update at login' solution for Websydian 3.0 and 3.1 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.
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 |
|
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>
Call _OldObjects.WrongMD2
// Map with Local<FieldsToSignature>
Cast Local<Password>, _OldObjects.WrongMD2/Output<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:
Windows/Java: '2003/12/01 14:01:23'
iSeries: '20031201140123000000'
Generate and build the functions WSYINTEG/_OldObjects.WrongMD2 and AcmeUserControl.Service.WebLoginPage.Login.