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_ThCtx
ESS_STR_TAppName
ESS_STR_TDbName
ESS_STR_TSecurityProvider
ESS_PUSHORT_TpCount
ESS_USERINFOEX_T ppUserList

Parameters

hCtxEssbase API context handle.
AppNameApplication name. If NULL, lists all users.
DbNamedatabasename. If NULL, lists users for all databases within application.
SecurityProviderThe name of the external authentication mechanism.
pCountAddress of variable to receive count of users.
ppUserListAddress 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

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