IMetabasePasswordPolicy.NotAllowUserName

Fore Syntax

NotAllowUserName: Boolean;

Fore.NET Syntax

NotAllowUserName: Boolean;

Description

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

Comments

If the property is set to True, on password changing it is checked for matching the user name. If they match, the error is generated.

By default the property is set to False, and the match check is not performed.

Fore Example

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    PswPolicy: IMetabasePasswordPolicy;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    PswPolicy := MS.Policy.PasswordPolicy;
    //Setting prohibition for matching user name and password
    PswPolicy.NotAllowUserName := True;
    MS.Apply;
End Sub UserProc;

On executing the example the prohibition for matching user name and password is set.

Fore.NET Example

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    PswPolicy: IMetabasePasswordPolicy;
Begin
    MB := Params.Metabase;
    MS := MB.Security;
    PswPolicy := MS.Policy.PasswordPolicy;
    //Setting prohibition for matching user name and password
    PswPolicy.NotAllowUserName := True;
    MS.Apply();
End Sub;

On executing the example the prohibition for matching user name and password is set.

See also:

IMetabasePasswordPolicy