PA_GetUserName

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_GetUserName (userName)

ParameterTypeDescription
userNamechar *Name of the current user

Description

The routine PA_GetUserName fills the string buffer pointed to by userName with the name of the current user.

This is like the Current user command.

Depending on default settings or on previous calls to PA_UsePStrings or PA_UseCStrings, userName will be a Pascal or an ANSI C string.

The max length of a user or group name is 31 chars (32 with the length byte or the 0 terminated)

Example

Get user info.

   void GetSomeCurrentUserInfo(char *name, long *id)
   {
      if(name)
         PA_GetUserName(name);
      if(id)
         PA_GetCurrentUserID();
   }

See Also

Current user, PA_GetCurrentUserID.

Error Handling

PA_GetLastError always returns eER_NoErr


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next