# EssListUsersEx

Description

EssListUsersEx() lists all users who have access to a particular Essbase server, application or database.

Syntax

    ESS_FUNC_M EssListUsersEx (hCtx, AppName, DbName, SecurityProvider, pCount,  ppUserList);

ESS_HCTX_T | hCtx
ESS_STR_T | AppName
ESS_STR_T | DbName
ESS_STR_T | SecurityProvider
ESS_PUSHORT_T | pCount
ESS_USERINFOEX_T | ppUserList

Parameters

hCtx | Essbase API context handle.
AppName | Application name. If NULL, lists all users.
DbName | databasename. If NULL, lists users for all databases within application.
SecurityProvider | The name of the external authentication mechanism.
pCount | Address of variable to receive count of users.
ppUserList | Address of pointer to receive an allocated array of user info structures. The AppName and DbName fields of the returned user info structures contain contain NULL values.

Return Value

If successful, returns a count of the number of users in pCount, and list of users with access to the specified application and database in ppUserList.

Notes

- If both AppName and DbName are not NULL, only users with access to the specified application and database are listed. If DbName is NULL, only users with access to the specified application are listed. If AppName is NULL, all users that exist on the server are listed.
- The AppName and DbName fields of the returned ESS_USERINFO_T structures contain NULL values.
- The memory allocated for ppUserList should be freed using EssFree().

Access

This function requires no special privileges.

Example

    ESS_STS_T
    ESS_ListUsers (ESS_HCTX_T  hCtx,
                   ESS_HINST_T hInst
                  )
    {
       ESS_STS_T        sts;
       ESS_USHORT_T     Count;
       ESS_PUSERINFO_T  Users = NULL;
       ESS_USHORT_T     ind;

       sts = EssListUsersEx (hCtx, NULL, NULL, &Count,
             &Users);
       if (!sts)
       {
          if (Count && Users)
          {
    printf ("\r\n-------User List-------\r\n\r\n");
             for (ind = 0; ind < Count; ind++)
             {
    printf ("Name->%s Application->%s database->%s\r\n",
             Users[ind].Name, Users[ind].AppName,
             Users[ind].DbName);
             }
             EssFree (hInst, Users);
          }
          else
    printf ("\r\nUsers list is empty\r\n\r\n");
       }
       return (sts);
    }

See Also

EssGetUser()
EssListConnections()
EssListGroups()
EssListLocks()
EssCreateExtUser
EssGetUserEx()
EssSetUserEx()
ESS_USERINFOEX_T