IMetabaseUser.PasswordChangedUser

Fore Syntax

PasswordChangedUser: IMetabaseUser;

Fore.NET Syntax

PasswordChangedUser: Prognoz.Platform.Interop.Metabase.IMetabaseUser;

Description

The PasswordChangedUser property returns the name of the user, that requested the password change.

Comments

The password change can be requested by the user, that has the "Change of users rights, distribution of passwords, distribution of user roles, change of policy" privilege.

Fore Example

To execute the example, add links to the Metabase and Ui system assemblies. The User_1 user should be in the security manager in the list of users.

Sub UserProc;
Var
    MB: IMetabase;
    SE: IMetabaseSecurity;
    MU, MU1: IMetabaseUser;
Begin
    mb := MetabaseClass.Active;
    SE := mb.Security;
    MU := SE.ResolveName("USER_1"As IMetabaseUser;
    MU1 := MU.PasswordChangedUser;
    If mu1=Null Then
        WinApplication.InformationBox("Password change was not required");
    Else
        WinApplication.InformationBox("Password change was requested by user " + MU1.Name);
    End If;
End Sub UserProc;

After executing the example the info message containing the password change request is displayed.

Fore.NET Example

The User_1 user should be in the security manager in the list of users. The specified procedure is an entry point for the .NET assembly.

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    SE: IMetabaseSecurity;
    MU, MU1: IMetabaseUser;
Begin
    mb := Params.Metabase;
    SE := mb.Security;
    MU := SE.ResolveName("USER_1"As IMetabaseUser;
    MU1 := MU.PasswordChangedUser;
    If mu1=Null Then
        System.Diagnostics.Debug.WriteLine("The password change was not mandatory");
    Else
        System.Diagnostics.Debug.WriteLine("The password change was requested by user " + MU1.Name);
    End If;
End Sub;

After executing the example the info message containing the password change request is displayed in the console window.

See also:

IMetabaseUser