IMetabaseAuditUserInfo.ChangePassword

Syntax

ChangePassword(OldPassword: String, NewPassword: String);

Parameters

OldPassword. Old password.

NewPassword. New password.

Description

The ChangePassword method changes service user password.

Comments

The service user password is changed when the password in DBMS is changed. If the old password is forgotten, to restore credentials, recreate a service user using the IMetabaseAuditUserInfo.CreateUser method.

After having changed the password update service user credentials on each user's computer using the PP.Util utility.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AuditUser: IMetabaseAuditUserInfo;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Get license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Get service user parameters
    AuditUser := MS.AuditUserInfo;
    
// Change service user password
    If AuditUser.IsSupported Then
        AuditUser.ChangePassword(
"wg5aj4""ajwg54");
    
End If;
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example the password of the service user of security system will be changed.

See also:

IMetabaseAuditUserInfo