From Clomosy Docs

To access information such as the user GUID, username, profile status, and profile information screen in an account created with a user account, the following functions can be used.

AppUserGUID

The user's GUID is retrieved.

Example

var
  userID : String;
{
 userID = Clomosy.AppUserGUID;
 ShowMessage('User GUID: '+userID);
}

AppUserDisplayName

The username information of the user who entered the project is retrieved.

Example

var
  userName : String;
{
 userName = Clomosy.AppUserDisplayName;
 ShowMessage('User Name: '+userName);
}

AppUserProfile

It checks whether the user in the project is an administrator. If the return value is 1, the user is an administrator; if it is 0, the user is a regular user.

Example

var
  userProfil : String;
{
 userProfil = Clomosy.AppUserProfile;
 if (userProfil == 1)
  ShowMessage('Administrator!');
 else
  ShowMessage('Not an administrator!');
}

CallUserProfile

This is a feature for calling the profile page. In the structure you call, the profile page opens and comes from the side menu.

Example

var
  Form1:TclForm;
  pBtn : TclButton;
void show
{
  Clomosy.CallUserProfile(Form1);
}
{
  Form1 = TclForm.Create(Self);
  pBtn= Form1.AddNewButton(Form1,'pBtn','Show Profile');
  pBtn.TextSettings.Font.Size=50;
  pBtn.Align = alCenter;
  pBtn.Height = 50;
  pBtn.Width = 150;
  Form1.AddNewEvent(pBtn,tbeOnClick,'show');
  
  Form1.Run;
}

See Also