IMetabaseUser.Profile

Fore Syntax

Profile: IUserProfile;

Fore.NET Syntax

Profile: IUserProfile;

Description

The Profile property returns the profile of the user.

Comments

The profile contains the information about the Email addresses which correspond to this user and any additional properties of the user. To edit the profile the user must have admin permissions.

Fore Example

Sub UserProc;
Var
    Mb: IMetabase;
    User: IMetabaseUser;
    Prof: IUserProfile;
    Emails: IUserEmails;
Begin
    Mb := MetabaseClass.Active;
    User := Mb.LogonSession.User;
    Prof := User.Profile.Edit;
    //Default address
    Prof.Email := "user_work@example.ru";
    Emails := Prof.Emails;
    //Mobile, work and home addresses
    Emails.Mobile := "user_mobile@example.ru";
    Emails.Working := "user_work@example.ru";
    Emails.Personal := "user_personal@example.ru";
    //Apply changes of the profile
    Prof.Apply;
End Sub UserProc;

On executing the example in the profile of the user under which the authorization in the repository is performed, the e-mail addresses will be changed.

Fore.NET Example

The specified procedure is an entry point for the .NET assembly.

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    User: IMetabaseUser;
    Prof: IUserProfile;
    Emails: IUserEmails;
Begin
    Mb := Params.Metabase;
    User := Mb.LogonSession.User;
    Prof := User.Profile.Edit();
    //Default address
    Prof.Email := "user_work@example.ru";
    Emails := Prof.Emails;
    //Mobile, work and home addresses
    Emails.Mobile := "user_mobile@example.ru";
    Emails.Working := "user_work@example.ru";
    Emails.Personal := "user_personal@example.ru";
    //Apply changes of the profile
    Prof.Apply();
End Sub;

On executing the example in the profile of the user under which the authorization in the repository is performed, the e-mail addresses will be changed.

See also:

IMetabaseUser