Equinox Online Help - Language Reference - A to Z
RemoveAttachedUser |
|
---|---|
Applies to | |
Syntax | RemoveAttachedUsers UserConnectionId |
Action | Removes the attached user with the specified User connection id |
Scope | Usable anywhere. |
Notes | This statement allows users to be removed progamatically without the use of j-display. This is paticularly useful where access to the server is a problem. |
Category | Client - Server |
See Also | ConnectionID, FirstAttachedUser, IsNetwork, IsUserAttached, IsUserGroupAttached, NextAttachedUser |
Example | Below is an example of how you might implement this into you application. Follow the instructions outlined in the knowledgebase article called ‘Before Logout, After Login’ to set up the system so that it maintains a currently connected user list. Amend the procedure AutoExecBeforeLogout so that rather than recording the time a user logs out of the system, it deletes the user from the connections list as follows: public procedure AutoExecBeforeLogoutstring vsConnectionIDend procedure | AutoExecBeforeLogout Now your application should be maintaining an accurate connection list. To remove a selected user from the list (for example if they have become a Ghost user), add a new button to your form labelled ‘Remove User’. Place the following code behind this new button: string vsId When you hit the button a pick list will appear with all the currently connected users in it. Select the user you want to remove and hit return. You will see an alert telling you whether the removal was successful or not. |