MaxFailedLogons: Integer;
The MaxFailedLogons property determines the maximum number of failed logons, after which the user is locked.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Policy: IMetabasePolicy;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
Policy := MS.Policy;
// Set the number of failed logons
Policy.MaxFailedLogons := 6;
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the number of failed logons is set to 6. When the specified number of logons is exceeded, the user is locked.
See also: