IMetabasePasswordPolicy.HistoryLength

Syntax

HistoryLength: Integer;

Description

The HistoryLength property determines the number of old passwords stored and checked for coincidence with a new user password.

Comments

This property can be used to impose restrictions on absolute coincidence of the old and the new password.

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    MbSecurity: IMetabaseSecurity;
    MbPolicy: IMetabasePolicy;
    MbPassPolicy: IMetabasePasswordPolicy;
    Lic: Object;
Begin
    Mb := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MbSecurity := Mb.Security;
    MbPolicy := MbSecurity.Policy;
    MbPassPolicy := MbPolicy.PasswordPolicy;
    
// Set number of old user passwords
    MbPassPolicy.HistoryLength := 3;
    
// Save changes
    MbSecurity.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example three old user passwords are stored in the history.

See also:

IMetabasePasswordPolicy