IMetabasePasswordPolicy.NotAllowUserName

Syntax

NotAllowUserName: Boolean;

Description

The NotAllowUserName property determines a restriction on coincidence of user name and password.

Comments

If the property is set to True, when the password is changed, it is checked for coincidence with the user name. If they match, the error is generated.

The property is set to False by default, and the check for coincidence is not executed.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    PswPolicy: IMetabasePasswordPolicy;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    PswPolicy := MS.Policy.PasswordPolicy;
    
// Prohibit that user name and password match
    PswPolicy.NotAllowUserName := True;
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example it will be prohibited that user name and password match.

See also:

IMetabasePasswordPolicy