version 1.5
OP Get users and groups (connectionID; listSelect; userNames; userConnections; userStartMethod; userLastLogins; ownerList; groupNames; groupSizes; groupOwners; members) Longint
Parameter | Type | Description | |
connectionID | Longint | Connection ID with target server | |
listSelect | Longint | Selects the Administrator (1) or Designer (0) user list | |
userNames | Array | Array of user names | |
userConnections | Array | Array of number of connections per user | |
userStartMethod | Array | Array of user startup methods | |
userLastLogins | Array | Array of 'last user login' dates | |
ownerList | Array | Array of object owners | |
groupNames | Array | Array of group names | |
groupSizes | Array | Array of number of users per group | |
groupOwners | Array | Array of group owners | |
members | Array | 2D array of user IDs per group | |
Function result | Longint | Error code result for the function |
Description
OP Get users and groups returns information about the users and groups defined for a database.
You can obtain this information only if you are connected as the Designer or the Administrator.
There are two sets of users in a 4th Dimension structure file. The Designer and Administrator maintain their own set of users. listSelect determines which set of users is retrieved by this command.
userNames, userStartMethod, and groupNames can be arrays of type Text or String.
userConnections, ownerList, groupSizes, and groupOwners can be arrays of type String, Text, Real, Integer, or Long Integer.
userLastLogins can be an array of type String, Text, or Date.
members is a two-dimensional array of type String, Text, Integer, or Long Integer. Each element in the array represents a group and is an array of user or group IDs in that group. The values returned in the second dimension are numeric and can be positive or negative depending on the nature of the members.
The following table shows how to interpret the values returned in the Members array:
Value | Designates | Description |
from 1 to 15000 | Users in | Gives the element number of the user name |
Designer set | in the UserName array returned by a call with | |
WhichSet = 0. [ElementNumber = Value] | ||
above 15000 | Groups in | Gives the element number plus 15000 of |
Designer set | the group name in the GroupName array | |
returned by a call with WhichSet = 0. | ||
[ElementNumber = Value - 15000] | ||
from -11 to -15000 | Users in | Gives the negative element number minus 10 |
Administrator set | of the user name in the UserName array returned | |
by a call with WhichSet = 1. | ||
[Element number = ABS(Value)-10] | ||
below -15000 | Groups in | Gives the negative element number minus 15000 |
Administrator set | of the group name in the GroupName array | |
returned by a call with WhichSet = 1. | ||
[Element number = ABS(Value)-15000] |
See Also