Equinox Online Help - Language Reference - A to Z

Home

FirstAttachedUser

Applies to
SyntaxFirstAttachedUser LoginNameItem, ConnectIDItem [, AllConnectionsExpression]
Action[Statement] Provides connection information for the first user currently attached
ScopeUsable anywhere
Notes

This statement is normally used with NextAttachedUser to step through the users currently attached to an application. LoginNameItem receives the login name of the first attached user. ConnectIDItem receives the connection identifier which can then be used in calls to functions such as QueueMessage.

The optional parameter AllConnectionsExpression can be supplied as True or False. If False, this returns only one LoginNameItem per connected user even if they are logged in multiple times. If True is supplied, multiple LoginNameItems per user will be returned, each with different ConnectIDItems. The default value is False.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryClient - Server
See Also ConnectionID, IsNetwork, IsUserAttached, IsUserGroupAttached, NextAttachedUser, RemoveAttachedUser
Example

This example sends a message to all application users asking them to log out.

string LoginName
number ConnectID

FirstAttachedUser LoginName, ConnectID, True

while not syserror
DisplayMessage "Please log out as soon as possible", ToConnection, ConnectID
NextAttachedUser LoginName, ConnectID
end while