OP Get users and groups

4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next

version 1.5


OP Get users and groups (connectionID; listSelect; userNames; userConnections; userStartMethod; userLastLogins; ownerList; groupNames; groupSizes; groupOwners; members) Longint

ParameterTypeDescription
connectionIDLongintConnection ID with target server
listSelectLongintSelects the Administrator (1) or Designer (0) user list
userNamesArrayArray of user names
userConnectionsArrayArray of number of connections per user
userStartMethodArrayArray of user startup methods
userLastLoginsArrayArray of 'last user login' dates
ownerListArrayArray of object owners
groupNamesArrayArray of group names
groupSizesArrayArray of number of users per group
groupOwnersArrayArray of group owners
membersArray2D array of user IDs per group
Function resultLongintError 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:

ValueDesignatesDescription
from 1 to 15000Users inGives the element number of the user name
Designer setin the UserName array returned by a call with
WhichSet = 0. [ElementNumber = Value]
above 15000Groups inGives the element number plus 15000 of
Designer setthe group name in the GroupName array
returned by a call with WhichSet = 0.
[ElementNumber = Value - 15000]
from -11 to -15000Users inGives the negative element number minus 10
Administrator setof the user name in the UserName array returned
by a call with WhichSet = 1.
[Element number = ABS(Value)-10]
below -15000Groups inGives the negative element number minus 15000
Administrator setof the group name in the GroupName array
returned by a call with WhichSet = 1.
[Element number = ABS(Value)-15000]

See Also

OP Get user list.


4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next