# EsbLogoutUser

Description

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

Syntax

    EsbLogoutUser (hCtx, LoginId)

    ByVal hCtx    As Long
    ByVal LoginId As Long

Parameters

hCtx | Essbase VB 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 EsbListConnections() 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

    Declare Function EsbLogoutUser Lib "ESBAPIW" (ByVal hCtx As Long, ByVal LoginId As Long) As Long
    Sub ESB_LogoutUser()
       Dim Items As Integer
       Dim UserInfo As ESB_USERINFO_T
       Dim sts As Long
       '*****************
       ' List Connections
       '*****************
       sts = EsbListConnections(hCtx, Items)
       '*****************
       ' Log out all users
       '*****************
       For n = 1 To Items
         '*****************************
         ' Get next User Info structure
         ' from the list
         '*****************************
         sts = EsbGetNextItem(hCtx, ESB_USERINFO_TYPE, UserInfo)
         sts = EsbLogoutUser(hCtx, UserInfo.LoginId)
       Next
    End Sub

See Also

EsbListConnections()
EsbLogout()