The built-in functions in the UAPI Package allow controlled access and manipulation of the user and group authorization database.
The major functionalities offered by UAPI are the following:
See also UAPISESSION.
Integer ANY
Any user or group type. Used as the searchType parameter to UAPI.PowerList() and as the typeMembership parameter to UAPI.MembershipListByID().
CONTAINSInteger CONTAINS
Search using the "Contains" operator. Used as the searchOpr parameter to UAPI.PowerList().
ENDSWITHInteger ENDSWITH
Search using the "Endswith" operator. Used as the searchOpr parameter to UAPI.PowerList().
FACTORYInteger FACTORY
Object factory group (excluded from rights) type.
FIRSTNAMEInteger FIRSTNAME
Search by first name. Used as the searchColumn parameter to UAPI.PowerList().
GROUPInteger GROUP
Group type.
LASTNAMEInteger LASTNAME
Search by last name. Used as the searchColumn parameter to UAPI.PowerList().
MAILADDRESSInteger MAILADDRESS
Search by mail address. Used as the searchColumn parameter to UAPI.PowerList().
NAMEInteger NAME
Search by name. Used as the searchColumn parameter to UAPI.PowerList().
NEXTInteger NEXT
Do a next/forward search. Used as the action parameter to UAPI.PowerList().
PREVIOUSInteger PREVIOUS
Do a next/backward search. Used as the action parameter to UAPI.PowerList().
PRIVATEGROUPInteger PRIVATEGROUP
Deprecated.
PRIVATEPROJECTInteger PRIVATEPROJECT
Deprecated.
PRIV_DAPI_SESSIONInteger PRIV_DAPI_SESSION
Can connect to the document database.
PRIV_LOGINInteger PRIV_LOGIN
Can log in.
PRIV_PERM_BYPASSInteger PRIV_PERM_BYPASS
Can access the document database without permission checking.
PRIV_PERM_SYSTEMInteger PRIV_PERM_SYSTEM
Has system permissions in the document database.
PRIV_PERM_WORLDInteger PRIV_PERM_WORLD
Has world permissions in the document database.
PRIV_UAPI_ADMINInteger PRIV_UAPI_ADMIN
Has user and group administrator privileges.
PRIV_UAPI_GROUPSInteger PRIV_UAPI_GROUPS
Can create public groups.
PRIV_UAPI_MANAGERInteger PRIV_UAPI_MANAGER
Deprecated.
PRIV_UAPI_PROJECTSInteger PRIV_UAPI_PROJECTS
Deprecated.
PRIV_UAPI_SESSIONInteger PRIV_UAPI_SESSION
Can connect to the user database.
PRIV_UAPI_USERSInteger PRIV_UAPI_USERS
Can create users.
PRIV_WAPI_BYPASSInteger PRIV_WAPI_BYPASS
Can access the workflow database without permission checking
PRIV_WAPI_SESSIONInteger PRIV_WAPI_SESSION
Can connect to the workflow database.
PROJECTInteger PROJECT
Deprecated.
PROXY_DAPIInteger PROXY_DAPI
Proxy for DAPI.
PROXY_NONEInteger PROXY_NONE
No proxy.
PROXY_WAPIInteger PROXY_WAPI
Proxy for WAPI.
RIGHTID_SYSTEMInteger RIGHTID_SYSTEM
Right ID represent system.
RIGHTID_WORLDInteger RIGHTID_WORLD
Right ID represent world.
SOUNDSLIKEInteger SOUNDSLIKE
Search using the "SoundsLike" operator. Used as the searchOpr parameter to UAPI.PowerList().
STARTSWITHInteger STARTSWITH
Search using the "Startswith" operator. Used as the searchOpr parameter to UAPI.PowerList().
SYSTEMInteger SYSTEM
System type. Used as the targetType parameter to UAPI.PowerList().
USERInteger USER
User type.
AddInteger Add( UAPISESSION session, Integer groupType, String groupName, [Integer leaderID = 0], [Dynamic groupData = UNDEFINED] )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.Create().
session | - | The UAPISession through which the group will be added. |
groupType | - | The UAPI type. |
groupName | - | The name of the new group to add. |
leaderID | - | An Integer user ID identifying the leader of the group. |
groupData | - | Any additional value to store in the database as part of the user or group identity. If more than one value needs to be stored, specify a List. |
Integer AddTo( UAPISESSION session, Integer newType, String newName, Integer typeTo, String nameTo )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.AddToByIDs().
session | - | The UAPISession through which the modification is made. |
newType | - | The UAPI type of the user or group being added. |
newName | - | The name of the existing user or group to add. |
typeTo | - | The UAPI type of the group to which the user or group specified by newType and newName will be added. |
nameTo | - | The name of the group to which the user or group specified by the newType and newName will be added. |
Integer AddToByIDs( UAPISESSION session, Integer childID, Integer parentID )
Adds a user or a group to a group by specifying their IDs.
Both the child user or group being added and the parent group to which the user or group is being added must exist or the function will fail.
session | - | The UAPISession through which the modification is made. |
childID | - | The id of the user or group being added. |
parentID | - | The id of the group to which the user or group specified by childID will be added. |
Integer AddUser( UAPISESSION session, String name, String password, Integer baseType, String baseName, Integer privileges, [Dynamic userData = UNDEFINED] )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.CreateUser().
session | - | The UAPISession through which the modification is made. |
name | - | The name of the user to add to the database. |
password | - | The password for the user account. If no password should be associated with the user, specify a null String. |
baseType | - | The UAPI type of the base group to which the user will belong. |
baseName | - | The name of the base group to which the user will belong. |
privileges | - | One or more of the user privilege constants, joined by bitwise OR operators ( | ). |
userData | - | Any additional value to store in the database as part of the user's identity. If more than one value needs to be stored, specify a List. |
Integer AddUserProxyByID( UAPISESSION session, Integer userID, Integer proxyID, Integer proxyType )
Adds a user proxy.
session | - | The UAPISession through which the modification is made. |
userID | - | The id of the user. |
proxyID | - | The id of the proxy. |
proxyType | - | The proxy type. |
UAPIUSER AllocEx( UAPISESSION session )
Creates an extended handle.
UAPI.AllocEx(), UAPI.ExGetByID(),
UAPI.ExSet(), and UAPI.ExUpdate()
are used in conjunction to add, query, update, and modify extended attributes
as related to a user or a group. In general, use:
Function | Purpose |
---|---|
UAPI.AllocEx() | To create a UAPIUser in which to store the attributes |
UAPI.ExGetByID() | To associate the UAPIUser with a user/group and retrieve previous values. |
UAPI.ExSet() | To create attributes within the UAPIUser and assign values. |
UAPI.ExUpdate() | To update the user/group Record with the new attributes. |
session | - | The UAPISession through which the extended attributes object will be allocated. |
UAPISESSION AllocSession( CAPILOGIN llConn )
Creates a UAPI session.
llConn | - | Specifies a CAPILOGIN referring to the Livelink user's connection to a database. |
Integer CheckAddPrivs( UAPISESSION session, Integer theType )
Determines whether or not users or groups can be added to the database through the specified UAPISession.
Integer CheckAlterPrivs( UAPISESSION session, Record identifier )
Determines whether or not a particular user or group can be modified through a given session.
session | - | The UAPISession used to identify the user whose modification privileges will be determined. |
identifier | - | A Record for a user or group, identifying a particular user or group for which modification privileges will be determined. |
RecArray ChildrenList( UAPISESSION session, Integer groupType, String groupName )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.ChildrenListByID().
session | - | The UAPISession through which the information is retrieved. |
groupType | - | The UAPI type of the group on which to operate. |
groupName | - | The name of the group whose children will be listed. |
RecArray ChildrenListByID( UAPISESSION session, Integer groupID )
Returns records of child members of the specified group.
If the specified group has no children, an empty RecArray is returned. Each Record contains the following fields:
Name | Type | Description |
---|---|---|
ID | Integer | The user or group ID |
OWNERID | Integer | The user ID of the user who created this user or group |
TYPE | Integer | The UAPI type (UAPI.USER or UAPI.GROUP) |
SPACEID | Integer | The id of the space |
NAME | String | The name of the user or group |
USERDATA | Dynamic | Any value stored in the user/group additional data field, undefined otherwise |
LEADERID | Integer | If the child is a group, the user ID of the user who is the leader of the group, undefined otherwise |
DELETED | Integer | 1 if this user/group has been deleted, 0 otherwise |
USERPWD | String | Encrypted user's password |
GROUPID | Integer | The ID of the user's base group |
USERPRIVILEGES | Integer | The user's privilege set |
LASTNAME | String | The user's last name |
MIDDLENAME | String | The user's middle initial |
FIRSTNAME | String | The user's first name |
MAILADDRESS | String | The user's e-mail address |
CONTACT | String | The contact information for the user |
TITLE | String | The user's title |
session | - | The UAPISession through which the information is retrieved. |
groupID | - | The Integer UAPI ID of the group on which to operate. |
Integer Create( UAPISESSION session, Integer groupType, Integer spaceID, String groupName, [Integer leaderID = 0], [Dynamic groupData = UNDEFINED] )
Creates a new group in the database.
Group names are unique within a group type in a space.
The user specified by the UAPISession must have Add privileges (verify using UAPI.CheckAddPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
groupType | - | The group type. |
spaceID | - | The ID of a space. |
groupName | - | The name of the new group to add. |
leaderID | - | An Integer user ID identifying the leader of the group. |
groupData | - | Any additional value to store in the database as part of the user or group identity. If more than one value needs to be stored, specify a List. |
Integer CreateUser( UAPISESSION session, String name, String password, Integer groupID, integer spaceID, Integer privileges, [Dynamic userData = UNDEFINED] )
Creates a new user in the database.
The user specified by the UAPISession must have modification privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
name | - | The name of the user to add to the database. |
password | - | The password for the user account. If no password should be associated with the user, specify a null String. |
groupID | - | The ID of the base group to which the user will belong. |
spaceID | - | The ID of the space to which the user will belong. |
privileges | - | One or more of the user privilege constants, joined by bitwise OR operators ( | ). |
userData | - | Any additional value to store in the database as part of the user's identity. If more than one value needs to be stored, specify a List. |
Integer Delete( UAPISESSION session, Integer groupType, String groupName, [Integer remove = 0] )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.DeleteByID().
session | - | The UAPISession through which the modification is made. |
groupType | - | The Integer UAPI type of the group to delete. |
groupName | - | The String name of the group to delete. |
remove | - | 1 - remove from database, 0 - default, mark as deleted in database. |
Integer DeleteByID( UAPISESSION session, Integer groupID, [Integer remove = 0] )
Deletes a group from the system.
If the parameter remove is 0, the group is marked as deleted in the database (the group row is not deleted), otherwise the group is deleted from the database.
The following is performed upon a group deletion:
Default group cannot be deleted.
The user specified by the UAPISession must have modification privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
groupID | - | The ID of the group to delete. |
remove | - | 1 - remove from database, 0 - default, mark as deleted in database. |
Integer DeleteFrom( UAPISESSION session, Integer newType, String newName,
Integer typeFrom, String nameFrom )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.DeleteFromByIDs().
session | - | The UAPISession through which the modification is made. |
delType | - | The Integer UAPI type of the user or group being removed. |
delName | - | The String name of the existing user or group to remove. |
typeFrom | - | The Integer UAPI type of the group from which the user or group specified by the delType and delName parameters will be removed. |
nameFrom | - | The String name of the group from which the user or group specified by the delType and delName parameters will be removed. |
Integer DeleteFromByIDs( UAPISESSION session, Integer childID, Integer parentID )
Removes a user or group from the specified group.
Executing this function removes the user or group from the membership List of the specified group, but does not delete the user from the database.
A user cannot be removed from from his or her base group.
The user specified by the UAPISession must have modification privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made |
childID | - | The id of the user or group being removed. |
parentID | - | The id of the group from which the user or group specified by childID will be removed. |
Integer DeleteUser( UAPISESSION session, String userName )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.DeleteUserByID().
session | - | The UAPISession through which the modification is made. |
userName | - | The String name of the user to delete. |
Integer DeleteUserByID( UAPISESSION session, Integer userID )
Deletes the specified user from the system.
When a user is deleted, the following is done:
The user specified by the UAPISession must have modification privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.session | - | The UAPISession through which the modification is made. |
userID | - | The ID of the user to delete. |
Integer DeleteUserProxyByID( UAPISESSION session, Integer userID, Integer proxyType )
Deletes a user proxy.
session | - | The UAPISession through which the modification is made. |
userID | - | The id of the user. |
proxyType | - | The proxy type. |
RecArray ExGet( UAPIUSER attribs, String userName )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.ExGetByID().
attribs | - | Specifies a UAPIUser, as allocated by UAPI.AllocEx(), in which the extended attributes are stored. |
userName | - | The String name of the user whose extended attributes are retrieved. |
RecArray ExGetByID( UAPIUSER attribs, Integer userID )
Associates an UAPIUser with a user and retrieves any existing extended attribute data.
The user specified by the UAPISession must have modification privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
See UAPI.AllocEx() for a summary of various extended attributes functions.
attribs | - | Specifies a UAPIUser, as allocated by UAPI.AllocEx(), in which the extended attributes are stored. |
userID | - | The ID of the user whose extended attributes are retrieved. |
Integer Expand( UAPISESSION session, RecArray theRecArray, String columnName )
Adds user information columns to a RecArray containing a user ID column.
The function is intended to quickly provide additional user information when only the user ID is currently available. The columns have the following names and contain the following data:
Name | Type | Description |
---|---|---|
columnName_OwnerID | Integer | if the child is a group, the user ID of the user who created the group, 0 otherwise |
columnName_Type | Integer | indicates the UAPI type |
columnName_Name | String | the name of the user or group |
columnName_UserData | String | any value stored in the user/group additional data field |
columnName_LeaderID | Integer | if the child is a group, the user ID of the user who is the leader of the group, undefined otherwise |
columnName_GroupID | Integer | the ID of the user's base group |
columnName_UserPrivileges | Integer | the user's privilege set |
In the table columnName is the name specified by the function's third parameter.
session | - | The UAPISession through which the modification is made. |
theRecArray | - | The RecArray upon which to operate. It must contain a user ID column. |
columnName | - | The String name of the column that contains the user IDs. The name specified will be used when naming the newly added columns. |
RecArray ExpandEx( UAPISESSION session, RecArray theRecArray, String columnName )
Adds user information columns to a RecArray containing a user ID column.
For details regarding the output RecArray, refer to UAPI.Expand().
session | - | The UAPISession through which the modification is made. |
theRecArray | - | The RecArray upon which to operate. It must contain a user ID column. |
columnName | - | The String name of the column that contains the user IDs. The name specified will be used when naming the newly added columns. |
Integer ExpandList( UAPISESSION session, RecArray theRecArray, List columnName )
Adds user information columns to a RecArray containing a user ID column.
Refer to UAPI.Expand() for details on the expanded RecArray.
session | - | The UAPISession through which the modification is made. |
theRecArray | - | The RecArray upon which to operate. It must contain one or more user ID columns. |
columnName | - | A List of column names containing the user IDs. |
Integer ExSet( UAPIUSER attribs, String name, Dynamic value )
Adds a new extended attribute to the specified extended attribute handle.
See UAPI.AllocEx() for a summary of the various extended attributes functions.
Unlike the optional userData parameter on UAPI.Create(), extended attributes cannot simply be stored as part of a user Record without any preplanning.
To store extended attributes, the user database, specifically the kUAF table, must first be modified. The columns that will hold the extended attributes must be added to the kUAF table before using the extended attribute functions.
attribs | - | Specifies a UAPIUser, as allocated by UAPI.AllocEx(), in which the extended attributes are stored. |
name | - | The String name of the attribute to be stored. It must be case-sensitively identical to a column name in the kUAF table. This will also be the name used as the column heading in the RecArray returned by UAPI.ExGetByID() when retrieving the extended attribute values. |
value | - | Specifies the value to be stored, which can be of any data type. |
Integer ExUpdate( UAPIUSER attribs )
Stores the specified extended attribute data to the database.
See UAPI.AllocEx() for a summary of the various extended attributes functions.
attribs | - | Specifies a UAPIUser, as allocated by UAPI.AllocEx(), in which the extended attributes are stored. |
RecArray Explode( UAPISESSION session, List explodeList )
Explodes a list of ids into a complete membership.
Returns a RecArray containing one record for each child member of the groups specified in the parameter explodeList. If the specified group has no children, an empty RecArray is returned. For details regarding the output RecArray, refer to UAPI.ChildrenList().
session | - | The UAPISession through which the information is retrieved. |
explodeList | - | The datatype List containing the IDs of the groups to be exploded. |
Integer FreeEx( UAPIUSER attribs )
Deprecated.
attribs | - | Specifies a UAPIUser, as returned by UAPI.AllocEx() |
Integer FreeSession( UAPISESSION session )
Deprecated.
session | - | The UAPISession to terminate. |
RecArray Get( UAPISESSION session, Integer theType, String name )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.GetByID().
session | - | The UAPISession through which the information is retrieved. |
theType | - | The UAPI type of the group or user for which information will be returned. |
name | - | The name of the group or user for which information will be returned. |
RecArray GetByID( UAPISESSION session, Integer ID )
Returns a RecArray containing the information of the specified user or group.
For details regarding the output RecArray, refer to UAPI.ChildrenListByID().
session | - | The UAPISession through which the information is retrieved. |
ID | - | The user or group ID. |
RecArray GetUser( UAPISESSION session, String userName )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.GetUserByID().
session | - | The UAPISession through which the information is retrieved. |
userName | - | The name of the user for which the information is retrieved. |
RecArray GetUserByID( UAPISESSION session, Integer ID )
Returns a RecArray containing detailed information of the specified user.
The one record in the RecArray return value contains the following fields:
Name | Type | Description |
---|---|---|
ID | Integer | The user or group ID |
OWNERID | Integer | The user ID of the user who created this user or group |
TYPE | Integer | The UAPI type |
SPACEID | Integer | The space ID |
NAME | String | The name of the user or group |
USERDATA | Dynamic | Any value stored in the user/group additional data field, undefined otherwise |
LEADERID | Integer | If the child is a group, the user ID of the user who is the leader of the group, undefined otherwise |
DELETED | Integer | 1 if this user/group has been deleted, 0 otherwise |
USERPWD | String | Encrypted user's password |
GROUPID | Integer | The ID of the user's base group |
USERPRIVILEGES | Integer | The user's privilege set |
LASTNAME | String | The user's last name |
MIDDLENAME | String | The user's middle initial |
FIRSTNAME | String | The user's first name |
MAILADDRESS | String | The user's e-mail address |
CONTACT | String | The contact information for the user |
TITLE | String | The user's title |
GROUPOWNERID | Integer | The ID of the user who created this user's base group |
GROUPTYPE | Integer | Indicates the user's base group UAPI type |
GROUPNAME | String | The name of this user's base group |
GROUPUSERDATA | Dynamic | Any optional group data stored as part of the base group record |
session | - | The UAPISession through which the information is retrieved. |
ID | - | The UAPI ID of the user for which the information is retrieved. |
Dynamic GetUserLanguage( CAPILOGIN login )
Get the user's preferred metadata language.
login | - | The CAPILogin through which the information is retrieved. |
String GetUILanguageByUserID( CAPICONNECT connection, Integer ID )
Get the user's user interface language given their user ID.
connection | - | The CAPIConnect through which the information is retrieved. |
ID | - | The ID of the user to get the information for. |
RecArray LeaderList( UAPISESSION session, Integer ID )
Determines which users and groups the specified user or group leads.
If the user or group specified by the ID parameter is not a leader, an empty RecArray is returned.
For details regarding the output RecArray, refer to UAPI.ChildrenListByID().
session | - | The UAPISession through which the information is retrieved. |
ID | - | The ID of the user or group for which the leader List will be obtained. |
RecArray List( UAPISESSION session, Integer theType, [Integer spaceID = 0] )
Lists all users or groups of the specified type in the specified space.
If there are no members of the specified type in the system, an empty RecArray is returned.
For details regarding the output RecArray, refer to UAPI.ChildrenListByID().
session | - | The UAPISession through which the information is retrieved. |
theType | - | The UAPI type. |
spaceID | - | The id of the space. The default is 0 for standard user and group. |
RecArray ListUserProxysByID( UAPISESSION session, Integer userID )
Lists the proxies for the specified user.
session | - | The UAPISession through which the information is retrieved. |
userID | - | The ID of the user. |
RecArray MembershipList( UAPISESSION session, Integer memberType, String memberName, Integer groupType )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.MembershipListByID().
session | - | The UAPISession through which the information is retrieved. |
memberType | - | The UAPI type of the user or group. |
memberName | - | The name of the user or group. |
groupType | - | The UAPI type, for which membership information will be returned. |
RecArray MembershipListByID( UAPISESSION session, Integer memberID, Integer groupType )
Lists all groups (of a particular type) of which the specified user or group is a direct member.
If the user or group specified by the memberID parameter is not a member of any groups of the specified groupType, an empty RecArray is returned.
For details regarding the output RecArray, refer to UAPI.ChildrenListByID().
Note: UAPI.MembershipListByID() returns only those groups of which the user or group specified is a direct member—for example, if “Arnold Wilson” is the specified user, and he belongs to the “Programming” group which is in turn a member of the “Research” group, the “Research” group will not appear in Arnold Wilson's membership List.
session | - | The UAPISession through which the information is retrieved. |
memberID | - | The ID of the user or group. |
groupType | - | The type, for which membership information will be returned. |
RecArray PowerList( UAPISESSION session, Integer targetType, Integer searchType, String searchValue, Integer action, Integer nRows, Integer searchColumn, Integer searchOpr, Integer startID, String startValue, [Integer groupID = -1], [Integer spaceID = 0] )
Returns a RecArray containing information about the set of users and groups within the specified group in the specified space that match the specified search criteria.
It provides a powerful and flexible means for searching for users and/or groups with a high degree of control. If no records matched the specified query criteria, an empty RecArray is returned. For details regarding the output RecArray, refer to UAPI.ChildrenListByID().
session | - | The UAPISession through which the information is retrieved. |
targetType | - | The type of group in which to search in; UAPI.SYSTEM to search in the entire system, or UAPI.GROUP to search only in the group specified by the groupID parameter. |
searchType | - | The UAPI type to return; UAPI.USER to return users only, UAPI.GROUP to return groups only, or UAPI.ANY to return both users and groups. |
searchValue | - | The value which the parameter searchColumn will be compared against. |
action | - | The direction in which to search in; UAPI.NEXT or UAPI.PREVIOUS. |
nRows | - | The maximum number of records to return. |
searchColumn | - | The column to compare; specify UAPI.NAME, UAPI.LASTNAME, UAPI.FIRSTNAME, or UAPI.MAILADDRESS. |
searchOpr | - | The operator defining the type of comparison made; specify UAPI.STARTSWITH, UAPI.CONTAINS, UAPI.ENDSWITH, or UAPI.SOUNDSLIKE. |
startID | - | The user or group ID to begin the search. Specify 0 only if the parameter startValue is an empty string or the parameter searchColumn is not UAPI.NAME. |
startValue | - | The value to begin the search. Specify an empty string only if the first set of records is to be returned. |
groupID | - | The group ID to search in. It is unused if the parameter targetType is UAPI.SYSTEM. |
spaceID | - | The space ID to search in. The default is 0 for standard user or group. |
Integer PrefsDelete( UAPISESSION session, Integer ID, [String keyword = ''] )
Deletes a specified user preference keyword or all of the user preference keywords.
session | - | The UAPISession through which the modification is made. |
ID | - | User ID for whom the preferences is deleted. |
keyword | - | If unspecified, deletes all preferences related to the user specified in the parameter ID. Otherwise, specify a string naming a keyword matching the particular preference to be deleted. |
Dynamic PrefsGet( UAPISESSION session, Integer ID, String keyword, [Dynamic dftValue = UNDEFINED] )
Retrieves a specified user preference value for a given keyword.
session | - | The UAPISession through which the information is retrieved. |
ID | - | User ID for whom a particular preference keyword is retrieved. |
keyword | - | The String keyword of the preference to retrieve. |
dftValue | - | Optional. If specified, then this is the value to be returned if the specified user preference's keyword is not found, otherwise Undefined will be returned in such a case. |
RecArray PrefsList( UAPISESSION session, Integer ID, [String keyword = ''] )
Lists either all user preference keywords or the value of a specified user's preference keyword.
If no preference keyword was found for the user,
an empty RecArray is returned. The RecArray columns will be the following:
Name | Type | Description |
---|---|---|
PREFSID | Integer | The specified parameter ID |
PREFSKEYWORD | String | Preference keyword |
PREFSVALUE | Dynamic | Stored value for the keyword |
session | - | The UAPISession through which the information is retrieved. |
ID | - | User ID for whom the user preference keywords are listed. |
keyword | - | Optional. If unspecified, lists all preferences related to the user specified in the parameter ID. Otherwise, specify a string keyword to list that preference's stored value for that keyword. |
Integer PrefsPut( UAPISESSION session, Integer ID, String keyword, [Dynamic value = UNDEFINED] )
Updates the value for an existing user preference keyword or adds a new user preference keyword for the specified user.
session | - | The UAPISession through which the modification is made. |
ID | - | User ID for whom a particular preference keyword is to be updated. |
keyword | - | The keyword of the preference to set/update. |
value | - | The new stored value if specified, otherwise undefined. |
Integer Rename( UAPISESSION session, Integer theType, String currentName, String newName )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.RenameByID().
session | - | The UAPISession through which the modification is made. |
theType | - | The UAPI type of the user or group to rename. |
currentName | - | The name of the user or group to rename. |
newName | - | The new name for the user or group. |
Integer RenameByID( UAPISESSION session, Integer ID, String newName )
Renames a user or group.
session | - | The UAPISession through which the modification is made. |
ID | - | The ID of the user or group to rename. |
newName | - | The new name for the user or group. |
RecArray RightsList( UAPISESSION session, Integer theType, String name, [Integer proxyType = UAPI.PROXY_NONE] )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.RightsListByID().
session | - | The UAPISession through which the information is retrieved. |
theType | - | The UAPI type of the user or group for whom membership information is returned. |
name | - | The name of the user or group for which membership information is returned. |
proxyType | - | The proxy type. |
RecArray RightsListByID( UAPISESSION session, Integer ID, [Integer proxyType = UAPI.PROXY_NONE] )
Returns a List of all groups of which the specified ID is a member (directly and indirectly).
Unlike the UAPI.MembershipListByID function, the UAPI.RightsListByID function travels completely down the membership information tree and returns all groups (of all types) of which the specified user is a member both directly or indirectly (through membership in another group).
For details regarding the output RecArray, refer to UAPI.ChildrenListByID().
session | - | The UAPISession through which the information is retrieved. |
ID | - | The ID of the user or group for whom membership is returned. |
proxyType | - | The proxy type. |
Integer SetLeader( UAPISESSION session, Integer theType, String name, Integer ID )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.SetLeaderByID().
session | - | The UAPISession through which the modification is made. |
theType | - | The UAPI type of the group whose leader will be changed. |
name | - | The name of the group whose leader will be changed. |
ID | - | The user or group ID of the new leader. |
Integer SetLeaderByID( UAPISESSION session, Integer groupID, Integer ID )
Changes the leader of a group.
The user specified by the UAPISession must have Alter privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
groupID | - | The ID of the group whose leader will be changed. |
ID | - | The user or group ID of the new leader. |
Integer SetOwner( UAPISESSION session, Integer theType, String name, Integer ownerID )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.SetOwnerByID().
session | - | The UAPISession through which the modification is made. |
theType | - | The UAPI type of the user or group whose owner will be changed. |
name | - | The name of the user or group whose owner will be changed. |
ownerID | - | The user or group ID of the new owner. |
Integer SetOwnerByID( UAPISESSION session, Integer ID, Integer ownerID )
Changes the owner of a user or group.
The user specified by the UAPISession must have Alter privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
ID | - | The ID the user or group whose owner will be changed. |
ownerID | - | The user or group ID of the new owner. |
Integer SetPWDExpireDateByID( UAPISESSION session, Integer userID, Date expirationDate )
Changes the password expiration date for a user.
session | - | The UAPISession through which the modification is made. |
userID | - | The ID the user. |
expirationDate | - | The new password expiration date. |
Integer SetPWDExpireModeByID( UAPISESSION session, Integer userID, Dynamic mode )
Changes the password expiration mode for a user.
session | - | The UAPISession through which the modification is made. |
userID | - | The ID the user. |
mode | - | The expiration mode. |
Integer SetUserData( UAPISESSION session, Integer theType, String name, Dynamic userData )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.SetUserDataByID().
session | - | The UAPISession through which the modification is made. |
theType | - | The UAPI type of the user or group whose userData will be changed. |
name | - | The name of the user or group whose userData will be changed. |
userData | - | The new value to store as the userData (for user type and name specifications). To store more than one value, specify a List. |
Integer SetUserDataByID( UAPISESSION session, Integer ID, Dynamic userData )
Modifies the value stored in the userData field of a user or a group.
The user specified by the UAPISession must have Alter privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
theType | - | The ID of the user or group whose userData will be changed. |
userData | - | The new value to store as the userData (for user type and name specifications). To store more than one value, specify a List. |
Integer SetUserDefaultGroup( UAPISESSION session, String userName, Integer groupType, String groupName )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.SetUserDefaultGroupByIDs().
session | - | The UAPISession through which the modification is made. |
userName | - | The name of the user whose default group will be changed. |
groupType | - | The UAPI type of the new default group. |
groupName | - | The name of the new default group. |
Integer SetUserDefaultGroupByIDs( UAPISESSION session, Integer userID, Integer groupID )
Assigns a new base group to the specified user.
The user specified by the UAPISession must have Alter privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
userID | - | The ID of the user. |
groupID | - | The ID of the new base group for this user. |
Integer SetUserLanguage( CAPILOGIN login, String languageCode,
Set the user's preferred metadata language.
login | - | The CAPILogin with which the information is associated. |
languageCode | - | The language code representing the user's preferred metadata language. |
Integer SetUserPassword( UAPISESSION session, String userName, Dynamic curPwd, String arg4 )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.SetUserPasswordByID().
session | - | The UAPISession through which the modification is made. |
userName | - | The name of the user whose password will be modified. |
curPwd | - | The user's current password. Must be either a String or Undefined. If specified, then the current password must pass verification before the new password is assigned. |
newPwd | - | The new password to assign. |
Integer SetUserPasswordByID( UAPISESSION session, Integer userID, Dynamic curPwd, String arg4 )
Modifies the specified user's password.
The user specified by the UAPISession must have Alter privileges (verify using the UAPI.CheckAlterPrivs function) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
userID | - | The ID of the user whose password will be modified. |
curPwd | - | The user's current password. Must be either a String or Undefined. If specified, then the current password must pass verification before the new password is assigned. |
newPwd | - | The new password to assign. |
Integer SetUserPrivileges( UAPISESSION session, String userName, Integer privileges )
Deprecated.
This function assumes it operates in the standard space (with spaceID of 0).
Use UAPI.SetUserPrivilegesByID().
session | - | The UAPISession through which the modification is made. |
userName | - | The name of the user whose privileges will be modified. |
privileges | - | Specifies one or more user privilege constants, combined using bitwise OR ( | ) operators. |
Integer SetUserPrivilegesByID( UAPISESSION session, Integer userID, Integer privileges )
Modifies the specified user's privileges.
The user specified by the UAPISession must have Alter privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.
session | - | The UAPISession through which the modification is made. |
userID | - | The ID of the user whose privileges will be modified. |
privileges | - | Specifies one or more user privilege constants, combined using bitwise OR ( | ) operators. |
RecArray UserList( UAPISESSION session, [Integer spaceID = 0], [Integer brevity = 0] )
Retrieves basic or extended information about all users in the specified space.
If the parameter brevity is 0, to retrieve extended information, the structure of the output RecArray will be that described in UAPI.GetUserByID().
If the parameter brevity is 1, to retrieves basic
information, the RecArray will have the following format:
Name | Type | Description |
---|---|---|
ID | Integer | The user or group ID |
NAME | String | The name of the user or group |
LASTNAME | String | The user's last name |
MIDDLENAME | String | The user's middle initial |
FIRSTNAME | String | The user's first name |
session | - | The UAPISession through which the information is retrieved. |
spaceID | - | The id of the space. The default is 0 for standard users. |
brevity | - | The default is 0 for extended information, or 1 for basic information. |