# EssLogoutUser

Description

EssLogoutUser() allows a Supervisor or an Application Designer to disconnect another user from an Essbase server.

Syntax

    ESS_FUNC_M EssLogoutUser (hCtx, LoginId);

ESS_HCTX_T | hCtx
ESS_LOGINID_T | LoginId

Parameters

hCtx | Essbase API context handle of user forcing the log out.
LoginId | Login ID of user to be logged out.

Return Value

None.

Notes

- LoginId can be obtained from the user information structure returned by the EssListConnections() function.
- This function logs out only the login represented by the specified LoginId. No other logins or contexts are affected.
- A Supervisor can log out anyone logged in to the server to which hCtx is logged in. An Application Designer can log out only those users connected to an application for which hCtx is an Application Designer. You can't log yourself out.

Access

To call this function, you must have Supervisor or Application Designer privilege.

Example

    ESS_FUNC_M ESS_LogoutUser (ESS_HCTX_T hCtx,
    ESS_HINST_T hInst)
    {
    ESS_FUNC_M sts = ESS_STS_NOERR;
    ESS_USHORT_T usrcnt;
    ESS_PUSERINFO_T users;
    sts = EssListConnections(hCtx, &usrcnt,
    &users);
    if(!sts)
    {
    if(usrcnt > 0)
    {
    /***************************************
    * Log out first user from the list *
    ***************************************/
    sts = EssLogoutUser(hCtx, users[0].LoginId);
    if(!sts)
    EssFree(hInst, users);
    }
    }
    return(sts);
    }

See Also

EssListConnections()
EssLogout()