IsLocked: Boolean;
The IsLocked property determines lock of the account of the specified user.
To execute the example, make sure that security manager contains the USER user.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
User: IMetabaseUser;
MS: IMetabaseSecurity;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
// Lock the USER user
User := MS.ResolveName("USER") As IMetabaseUser;
User.IsLocked := True;
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the USER user is locked.
See also: