OScript API/Built-in Package Index

Class: UAPI

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.

Class Attributes

Any user or group type.

Any external user or group type.

Search using the "Contains" operator.

Search using the "Endswith" operator.

Group type id for an external group

User type id for an external user.

Object factory group (excluded from rights).

Search by first name.

Group type.

Could not set the specified user's password expiration date.

Could not set the specified user's password expiration mode.

Search by last name.

Search by mailaddress.

Search by name.

Do a next/forward search.

Do a next/backward search.

Can perform Content Administration tasks.

Can connect to the document database.

Can log in.

Can access the document database without permission checking.

Has system permissions in the document database.

Has world permissions in the document database.

Has user and group administrator privileges.

Can create public groups.

PRIV_UAPI_MANAGER Deprecated
PRIV_UAPI_PROJECTS Deprecated

Can connect to the user database.

Can create users.

Can access the workflow database without permission checking.

Can connect to the workflow database.

PROJECT Deprecated

Proxy for DAPI.

No Proxy.

Proxy for WAPI.

Right ID representing access for All Users.

Disable right id

Right ID representing the system.

Right ID representing Public Access.

User type id for a Service Group.

The ID of the Service Users group.

The name of the Service Users group.

User type id for a Service User.

Search using the "SoundsLike" operator.

Search using the "Startswith" operator.

System type.

User type id for a System Group.

User type id for a System User.

User type id for a Tenant Administrator.

User type id for a Tenant Administrator Group.

The ID of the Tenant Administrator group.

The name of the Tenant Administrator group.

User type.

Class Methods

Add( UAPISESSION session, Integer groupType, String groupName, [Integer leaderID], [Dynamic groupData] ) Deprecated
AddTo( UAPISESSION session, Integer newType, String newName, Integer typeTo, String nameTo ) Deprecated

Deprecated.

AddToByIDs( UAPISESSION session, Integer childID, Integer parentID )

Adds a user or a group to a group by specifying their IDs.

AddUser( UAPISESSION session, String name, String password, Integer baseType, String baseName, Integer privileges, [Dynamic userData] ) Deprecated
AddUserProxyByID( UAPISESSION session, Integer userID, Integer proxyID, Integer proxyType )

Adds a user proxy.

AllocEx( UAPISESSION session )

Creates an extended attributes handle.

AllocSession( CAPILOGIN llConn )

Returns a new UAPI session.

CheckAddPrivs( UAPISESSION session, Integer theType )

Determines whether or not users or groups can be added to the database.

CheckAlterPrivs( UAPISESSION session, Record identifier )

Determines whether or not a particular user or group is modifiable in the given UAPISESSION.

ChildrenList( UAPISESSION session, Integer groupType, String groupName ) Deprecated
ChildrenListByID( UAPISESSION session, Integer groupID )

Returns records of child members of the specified group.

Create( UAPISESSION session, Integer groupType, Integer spaceID, String groupName, [Integer leaderID], [Dynamic groupData] )

Creates a new group in the database.

CreateIdentity( UAPISESSION session, String identity, Integer identityTypeID, [String displayStr], [Integer userID] )

Creates a new identity in the database.

CreateIdentityType( UAPISESSION session, String identityType )

Creates a new identity type in the database.

CreateUser( UAPISESSION session, String name, String password, Integer groupID, Integer spaceID, Integer privileges, [Dynamic userData], [Integer userType], [Dynamic cbContext], [Integer userID] )

Creates a new user in the database.

Delete( UAPISESSION session, Integer groupType, String groupName, [Integer remove] ) Deprecated
DeleteByID( UAPISESSION session, Integer groupID, [Integer remove] )

Deletes a group from the system.

DeleteFrom( UAPISESSION session, Integer delType, String delName, Integer typeFrom, String nameFrom ) Deprecated
DeleteFromByIDs( UAPISESSION session, Integer childID, Integer parentID )

Removes a user or group from the specified group.

DeleteIdentity( UAPISESSION session, String identity, Integer identityTypeID )

Delete an identity from the database.

DeleteIdentityByID( UAPISESSION session, Integer identityID )

Delete an identity from the database by the identity ID.

DeleteUser( UAPISESSION session, String userName ) Deprecated
DeleteUserByID( UAPISESSION session, Integer userID )

Deletes the specified user from the system.

DeleteUserProxyByID( UAPISESSION session, Integer userID, Integer proxyType )

Deletes a user proxy.

ExGet( UAPIUSER attribs, String userName ) Deprecated
ExGetByID( UAPIUSER attribs, Integer userID )

Associates a UAPIUser with a user and retrieves any existing extended attribute data.

Expand( UAPISESSION session, RecArray theRecArray, String columnName )

Adds user information columns to a RecArray containing a user ID column.

ExpandEx( UAPISESSION session, RecArray theRecArray, String columnName )

Adds user information columns to a RecArray containing a user ID column.

ExpandList( UAPISESSION session, RecArray theRecArray, List columnName )

Adds user information columns to a RecArray containing a user ID column.

Explode( UAPISESSION session, List explodeList )

Explodes a list of ids into a complete membership.

ExSet( UAPIUSER attribs, String name, Dynamic value )

Adds a new extended attribute data to the specified extended attribute handle.

ExUpdate( UAPIUSER attribs )

Stores the specified extended attribute data to the database.

FreeEx( UAPIUSER attribs ) Deprecated
FreeSession( UAPISESSION session ) Deprecated
Get( UAPISESSION session, Integer theType, String name ) Deprecated
GetByID( UAPISESSION session, Integer ID )

Returns a RecArray containing the information of the specified user or group.

GetIdentity( UAPISESSION session, String identity, Integer identityTypeID )

Gets an identity from the database.

GetIdentityByID( UAPISESSION session, Integer identityID )

Gets an identity from the database by ID number.

GetIdentityTypeID( UAPISESSION session, String identityType )

Get the identity type ID for an identity type.

GetIdentityTypes( UAPISESSION session )

Get a list of all identity types.

GetUILanguageByUserID( CAPICONNECT connection, Integer ID )

Gets the user's user interface language.

GetUser( UAPISESSION session, String userName ) Deprecated
GetUserByID( UAPISESSION session, Integer ID )

Returns a RecArray containing detailed information of the specified user.

GetUserLanguage( CAPILOGIN login )

Gets the user's preferred metadata language.

LeaderList( UAPISESSION session, Integer ID )

Determines which users and groups the specified user or group leads.

List( UAPISESSION session, Integer theType, [Integer spaceID] )

Lists all users or groups of the specified type in the specified space.

ListUserProxysByID( UAPISESSION session, Integer userID )

Lists the proxies for the specified user.

MembershipList( UAPISESSION session, Integer memberType, String memberName, Integer groupType ) Deprecated
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.

PowerList( UAPISESSION session, Integer targetType, Integer searchType, String searchValue, Integer action, Integer nRows, Integer searchColumn, Integer searchOpr, Integer startID, String startValue, [Integer groupID], [Integer spaceID] )

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.

PrefsDelete( UAPISESSION session, Integer ID, [String keyword] )

Deletes a specified user preference keyword or all of the user preference keywords.

PrefsGet( UAPISESSION session, Integer ID, String keyword, [Dynamic dftValue] )

Retrieves a specified user preference's value for a given keyword.

PrefsList( UAPISESSION session, Integer ID, [String keyword] )

Lists all the user preference keywords or a specified user preference keyword.

PrefsPut( UAPISESSION session, Integer ID, String keyword, [Dynamic value] )

Updates the value for an existing user preference keyword or adds a new user preference keyword for the specified user.

Rename( UAPISESSION session, Integer theType, String currentName, String newName ) Deprecated
RenameByID( UAPISESSION session, Integer ID, String newName )

Renames a user or group.

RightsList( UAPISESSION session, Integer theType, String name, [Integer proxyType] ) Deprecated
RightsListByID( UAPISESSION session, Integer ID, [Integer proxyType] )

Returns a List of all groups of which the specified ID is a member (directly and indirectly).

SetLeader( UAPISESSION session, Integer theType, String name, Integer ID ) Deprecated
SetLeaderByID( UAPISESSION session, Integer groupID, Integer ID )

Changes the leader of a group.

SetOwner( UAPISESSION session, Integer theType, String name, Integer ownerID ) Deprecated
SetOwnerByID( UAPISESSION session, Integer ID, Integer ownerID )

Changes the owner of a user or group.

SetPWDExpireDateByID( UAPISESSION session, Integer userID, Date expirationDate )

Changes the password expiration date for a user.

SetPWDExpireModeByID( UAPISESSION session, Integer userID, Dynamic mode )

Changes the password expiration mode for a user.

SetUserData( UAPISESSION session, Integer theType, String name, Dynamic userData ) Deprecated
SetUserDataByID( UAPISESSION session, Integer theType, Dynamic userData )

Modifies the value stored in the userData field of a user or a group.

SetUserDefaultGroup( UAPISESSION session, String userName, Integer groupType, String groupName ) Deprecated
SetUserDefaultGroupByIDs( UAPISESSION session, Integer userID, Integer groupID )

Assigns a new base group to the specified user.

SetUserLanguage( CAPILOGIN login, String languageCode )

Sets the user's preferred metadata language.

SetUserPassword( UAPISESSION session, String userName, Dynamic curPwd, String newPwd ) Deprecated
SetUserPasswordByID( UAPISESSION session, Integer userID, Dynamic curPwd, String newPwd )

Modifies the specified user's password.

SetUserPrivileges( UAPISESSION session, String userName, Integer privileges ) Deprecated
SetUserPrivilegesByID( UAPISESSION session, Integer userID, Integer privileges )

Modifies the specified user's privileges.

UserList( UAPISESSION session, [Integer spaceID], [Integer brevity] )

Retrieves basic or extended information about all users in the specified space.

Class Attributes

Integer ANY

Any user or group type. Used as the searchType parameter to UAPI.PowerList() and as the typeMembership parameter to UAPI.MembershipListByID().

Integer ANY_EXTERNAL

Any external user or group type. Used as the searchType parameter to UAPI.PowerList() and as the typeMembership parameter to UAPI.MembershipListByID().

Integer CONTAINS

Search using the "Contains" operator. Used as the searchOpr parameter to UAPI.PowerList().

Integer ENDSWITH

Search using the "Endswith" operator. Used as the searchOpr parameter to UAPI.PowerList().

Integer EXTERNALGROUP

Group type id for an external group

Integer EXTERNALUSER

User type id for an external user.

Integer FACTORY

Object factory group (excluded from rights) type.

Integer FIRSTNAME

Search by first name. Used as the searchColumn parameter to UAPI.PowerList().

Integer GROUP

Group type.

Could not set the specified user's password expiration date.

Could not set the specified user's password expiration mode.

Integer LASTNAME

Search by last name. Used as the searchColumn parameter to UAPI.PowerList().

Integer MAILADDRESS

Search by mail address. Used as the searchColumn parameter to UAPI.PowerList().

Integer NAME

Search by name. Used as the searchColumn parameter to UAPI.PowerList().

Integer NEXT

Do a next/forward search. Used as the action parameter to UAPI.PowerList().

Integer PREVIOUS

Do a next/backward search. Used as the action parameter to UAPI.PowerList().

Can perform Content Administration tasks.

Can connect to the document database.

Integer PRIV_LOGIN

Can log in.

Can access the document database without permission checking.

Has system permissions in the document database.

Has world permissions in the document database.

Has user and group administrator privileges.

Can create public groups.

Integer PRIV_UAPI_MANAGER Deprecated
Integer PRIV_UAPI_PROJECTS Deprecated

Can connect to the user database.

Can create users.

Can access the workflow database without permission checking

Can connect to the workflow database.

Integer PROJECT Deprecated
Integer PROXY_DAPI

Proxy for DAPI.

Integer PROXY_NONE

No proxy.

Integer PROXY_WAPI

Proxy for WAPI.

Right ID represent world.

Disable right id.

Right ID represent system.

Integer RIGHTID_WORLD

Right ID represent world.

Integer SERVICEGROUP

User type id for a service group.

The ID of the Service Users group.

The name of the Service Users group.

Integer SERVICEUSER

User type id for a service user.

Integer SOUNDSLIKE

Search using the "SoundsLike" operator. Used as the searchOpr parameter to UAPI.PowerList().

Integer STARTSWITH

Search using the "Startswith" operator. Used as the searchOpr parameter to UAPI.PowerList().

Integer SYSTEM

System type. Used as the targetType parameter to UAPI.PowerList().

Integer SYSTEMGROUP

User type id for a system group.

Integer SYSTEMUSER

User type id for a system user.

User type id for a tenant administrator.

User type id for a tenant administrator group.

The ID of the Tenant Administrator group.

The name of the Tenant Administrator group.

Integer USER

User type.

Class Methods

Add

Deprecated
Integer Add( UAPISESSION session,
             Integer groupType,
             String groupName,
             [Integer leaderID],
             [Dynamic groupData] )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.Create().

Parameters

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.

Returns:

The ID of the new group if successful, error otherwise.

AddTo

Deprecated
Integer AddTo( UAPISESSION session,
               Integer newType,
               String newName,
               Integer typeTo,
               String nameTo )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.AddToByIDs().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

AddToByIDs

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

AddUser

Deprecated
Integer AddUser( UAPISESSION session,
                 String name,
                 String password,
                 Integer baseType,
                 String baseName,
                 Integer privileges,
                 [Dynamic userData] )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.CreateUser().

Parameters

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.

Returns:

The ID of the new user if successful, error otherwise.

AddUserProxyByID

Integer AddUserProxyByID( UAPISESSION session,
                          Integer userID,
                          Integer proxyID,
                          Integer proxyType )

Adds a user proxy.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

AllocEx

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:

Parameters

session

The UAPISession through which the extended attributes object will be allocated.

Returns:

A UAPIUser providing an extended attributes handle.

AllocSession

UAPISESSION AllocSession( CAPILOGIN llConn )

Creates a UAPI session.

Parameters

llConn

Specifies a CAPILOGIN referring to the Livelink user's connection to a database.

Returns:

If successful, a UAPISession associating a user with a database connection, otherwise UAPI.KUAF_BADPRIVS if the user associated with session does not have enough privileges to allocate UAPI session.

CheckAddPrivs

Integer CheckAddPrivs( UAPISESSION session,
                       Integer theType )

Determines whether or not users or groups can be added to the database through the specified UAPISession.

Parameters

session

The UAPISession through which associated user's privileges will be determined.

theType

The UAPI type (either UAPI.USER or UAPI.GROUP) for which addition privileges are checked.

Returns:

The Integer 0 if successful and addition is permitted; error otherwise.

CheckAlterPrivs

Integer CheckAlterPrivs( UAPISESSION session,
                         Record identifier )

Determines whether or not a particular user or group can be modified through a given session. Note that a creator of groups is not necessarily able to edit the groups he/she created. A group is modifiable only if the user has enough privileges, unless he/she is either Admin or the group leader.

Parameters

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.

Returns:

The Integer 0 if successful and alteration is permitted, error otherwise.

ChildrenList

Deprecated
RecArray ChildrenList( UAPISESSION session,
                       Integer groupType,
                       String groupName )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.ChildrenListByID().

Parameters

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.

Returns:

A RecArray containing records of users and groups if successful, error otherwise.

ChildrenListByID

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:

Parameters

session

The UAPISession through which the information is retrieved.

groupID

The Integer UAPI ID of the group on which to operate.

Returns:

A RecArray containing records of users and groups if successful, error otherwise.

Create

Integer Create( UAPISESSION session,
                Integer groupType,
                Integer spaceID,
                String groupName,
                [Integer leaderID],
                [Dynamic groupData] )

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.

Parameters

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.

Returns:

The ID of the created group if successful, error otherwise.

CreateIdentity

Integer CreateIdentity( UAPISESSION session,
                        String identity,
                        Integer identityTypeID,
                        [String displayStr],
                        [Integer userID] )

Creates a new identity in the database.

An identity is an entity that can be used to identify the original creator of a document or other items uploaded to Content Server. It is not a Content Server user but can be associated with one as an alias if, for example, a Content Server user is also the original creator of a document. For example an identity could be an email address, a phone number, a login id, a guid etc.

Parameters

session

The UAPISession through which the creation is made.

identity

A string representing the identity.

identityTypeID

The ID number of the type of identity.

displayStr

A user friendly string for display.

userID

An Integer user ID associated with this identity.

Returns:

The ID of the created identity if successful, error otherwise

Example

            Object prgctx = $pSession
            UAPISESSION  uSession = prgCtx.Usession().fSession

            // New identity
            Integer identityID = UAPI.CreateIdentity( uSession, "JSmith@gmail.com", 1, "John Smith", 2000 )

CreateIdentityType

Integer CreateIdentityType( UAPISESSION session,
                            String identityType )

Creates a new identity type in the database.

An identity type represent the type of the identity e.g. "email", "phone number", "login name", etc

Parameters

session

The UAPISession through which the creation is made.

identityType

A string representing the identity type.

Returns:

An number representing the ID of the new type:

Example

        Object prgctx = $pSession
        UAPISESSION  uSession = prgCtx.Usession().fSession

        dynamic ret = UAPI.CreateIdentityType( uSession, "email" )
        echo(ret)

        Output:
        38

CreateUser

Integer CreateUser( UAPISESSION session,
                    String name,
                    String password,
                    Integer groupID,
                    Integer spaceID,
                    Integer privileges,
                    [Dynamic userData],
                    [Integer userType],
                    [Dynamic cbContext],
                    [Integer userID] )

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.

Parameters

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.

userType

User type identifier. The default value is UAPI.USER.

cbContext

Context data to be included in callback functions invoked from this interface.

userID

The user ID to use for creating the user, if Global Content Server is enabled.

Returns:

The ID of the created user if successful, error otherwise.

Delete

Deprecated
Integer Delete( UAPISESSION session,
                Integer groupType,
                String groupName,
                [Integer remove] )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.DeleteByID().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

DeleteByID

Integer DeleteByID( UAPISESSION session,
                    Integer groupID,
                    [Integer remove] )

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:

  • The deleted group is renamed, so the name from the deleted group may be reused.
  • The deleted group is automatically removed from any other group or project of which it was formerly a member.
  • If the group deleted is a user's base group, that user's base group is reset to the default group.

Default group cannot be deleted.

The user specified by the UAPISession must have modification privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

DeleteFrom

Deprecated
Integer DeleteFrom( UAPISESSION session,
                    Integer delType,
                    String delName,
                    Integer typeFrom,
                    String nameFrom )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.DeleteFromByIDs().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

DeleteFromByIDs

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

DeleteIdentity

Boolean DeleteIdentity( UAPISESSION session,
                        String identity,
                        Integer identityTypeID )

Delete an identity from the database.

Parameters

session

The UAPISession object.

identity

A string representing the identity.

identityTypeID

The ID number of the type of identity.

Returns:

Returns true if deletion succeeded, otherwise false.

Example

        Object prgctx = $pSession
        UAPISESSION  uSession = prgCtx.Usession().fSession

        dynamic ret = UAPI.DeleteIdentity( uSession, "JSmith@gmail.com", 1 )
        echo(ret)

        Output:

        true

DeleteIdentityByID

Boolean DeleteIdentityByID( UAPISESSION session,
                            Integer identityID )

Delete an identity from the database.

Parameters

session

The UAPISession object.

identityID

The ID number of the identity.

Returns:

Returns true if deletion succeeded, otherwise false.

Example

        Object prgctx = $pSession
        UAPISESSION  uSession = prgCtx.Usession().fSession

        dynamic ret = UAPI.DeleteIdentityByID( uSession, 59 )
        echo(ret)

        Output:

        true

DeleteUser

Deprecated
Integer DeleteUser( UAPISESSION session,
                    String userName )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.DeleteUserByID().

Parameters

session

The UAPISession through which the modification is made.

userName

The String name of the user to delete.

Returns:

The Integer 0 if successful, error otherwise.

DeleteUserByID

Integer DeleteUserByID( UAPISESSION session,
                        Integer userID )

Deletes the specified user from the system.

When a user is deleted, the following is done:

  • The user is marked as deleted in the database (the user row is not deleted).
  • The deleted user is renamed, so the name of the deleted user may be reused.
  • The deleted user is automatically removed from any other group or project of which it was a member.
  • If the deleted user leads any groups, their leaderID is updated to undefined.

The user specified by the UAPISession must have modification privileges (verify using UAPI.CheckAlterPrivs()) to successfully execute this function.

Parameters

session

The UAPISession through which the modification is made.

userID

The ID of the user to delete.

Returns:

The Integer 0 if successful, error otherwise.

DeleteUserProxyByID

Integer DeleteUserProxyByID( UAPISESSION session,
                             Integer userID,
                             Integer proxyType )

Deletes a user proxy.

Parameters

session

The UAPISession through which the modification is made.

userID

The id of the user.

proxyType

The proxy type.

Returns:

The Integer 0 if successful, error otherwise.

ExGet

Deprecated
RecArray ExGet( UAPIUSER attribs,
                String userName )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.ExGetByID().

Parameters

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.

Returns:

A RecArray containing one Record, in which the extended attributes for the specified user are stored. The format of the Record will depend upon the structure of the user Record, but will contain one field for each attribute.
If no extended attributes have been stored for the specified user, an empty RecArray is returned. An Error will be returned if the function does not complete successfully.

ExGetByID

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.

Parameters

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.

Returns:

A RecArray containing one Record, in which the extended attributes for the specified user are stored. The format of the Record will depend upon the structure of the user Record, but will contain one field for each attribute.
If no extended attributes have been stored for the specified user, an empty RecArray is returned. An Error will be returned if the function does not complete successfully.

Expand

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:

In the table columnName is the name specified by the function's third parameter.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

ExpandEx

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().

Parameters

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.

Returns:

The passed in RecArray with expanded columns if successful, error otherwise.

ExpandList

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

Explode

RecArray Explode( UAPISESSION session,
                  List explodeList )

Explodes a list of ids into a complete membership.

Returns a RecArray containing one record for each group and child member of the groups specified in the parameter explodeList.

For details regarding the output RecArray, refer to UAPI.ChildrenList().

Parameters

session

The UAPISession through which the information is retrieved.

explodeList

The datatype List containing the IDs of the groups to be exploded.

Returns:

A RecArray containing one record for each user or group that is a child (member) of the groups specified in the parameter explodeList.

ExSet

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

ExUpdate

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.

Parameters

attribs

Specifies a UAPIUser, as allocated by UAPI.AllocEx(), in which the extended attributes are stored.

Returns:

The Integer 0 if successful, error otherwise.

FreeEx

Deprecated
Integer FreeEx( UAPIUSER attribs )

Parameters

attribs

Specifies a UAPIUser, as returned by UAPI.AllocEx()

Returns:

The Integer 0 if successful, error otherwise.

FreeSession

Deprecated
Integer FreeSession( UAPISESSION session )

Parameters

session

The UAPISession to terminate.

Returns:

The Integer 0 if successful, error otherwise.

Get

Deprecated
RecArray Get( UAPISESSION session,
              Integer theType,
              String name )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.GetByID().

Parameters

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.

Returns:

A RecArray containing only one record for the user or group if successful, error otherwise.

GetByID

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().

Parameters

session

The UAPISession through which the information is retrieved.

ID

The user or group ID.

Returns:

A RecArray containing only one record for the user or group if successful, error otherwise.

GetIdentity

Assoc GetIdentity( UAPISESSION session,
                   String identity,
                   Integer identityTypeID )

Get an identity from the database.

Parameters

session

The UAPISession object.

identity

A string representing the identity.

identityTypeID

The ID number of the type of identity.

Returns:

An assoc containing the following keys:

Identity        - The string representing the identity
IdentityID      - An ID number for the identity
IdentityTypeID  - The identity type id of this identity
UserID          - The Content Server user ID, if any, associated with this identity.
DisplayStr      - The display string.

Example

Object prgctx = $pSession

UAPISESSION uSession = prgCtx.Usession().fSession

dynamic ret = UAPI.GetIdentity( uSession, "JSmith@gmail.com", 1 )

echo(ret)

Output:

A<1,?,'DisplayStr'='John Smith','Identity'='JSmith@gmail.com','IdentityID'=59,'IdentityTypeID'=1,'UserID'=2000>

GetIdentityByID

Assoc GetIdentityByID( UAPISESSION session,
                       Integer identityID )

Get an identity from the database by ID number.

Parameters

session

The UAPISession object.

identityID

An ID number representing the identity.

Returns:

An assoc containing the following keys:

Identity        - The string representing the identity
IdentityID      - An ID number for the identity
IdentityTypeID  - The identity type id of this identity
UserID          - The Content Server user ID, if any, associated with this identity.
DisplayStr      - The display string.

Example

Object prgctx = $pSession

UAPISESSION uSession = prgCtx.Usession().fSession

dynamic ret = UAPI.GetIdentityByID( uSession, 59 )

echo(ret)

Output:

A<1,?,'DisplayStr'='John Smith','Identity'='JSmith@gmail.com','IdentityID'=59,'IdentityTypeID'=39,'UserID'=2000>

GetIdentityTypeID

Integer GetIdentityTypeID( UAPISESSION session,
                           String identityType )

Get the identity type ID for an identity type.

Parameters

session

The UAPISession object.

identityType

A string representing the identity type.

Returns:

The ID number of the identity type

Example

        Object prgctx = $pSession
        UAPISESSION  uSession = prgCtx.Usession().fSession

        dynamic ret = UAPI.GetIdentityTypeID( uSession, "email" )
        echo(ret)

        Output:

        39

GetIdentityTypes

RecArray GetIdentityTypes( UAPISESSION session )

Get a list of all identity types.

Parameters

session

The UAPISession object.

Returns:

A list of all identity types.

Example

        Object prgctx = $pSession
        UAPISESSION  uSession = prgCtx.Usession().fSession

        dynamic ret = UAPI.GetIdentityTypes( uSession )
        echo(ret)

        Output:

        V{<'Value'><'email'><'login name'><'guid'>}

GetUILanguageByUserID

String GetUILanguageByUserID( CAPICONNECT connection,
                              Integer ID )

Get the user's user interface language given their user ID.

Parameters

connection

The CAPIConnect through which the information is retrieved.

ID

The ID of the user to get the information for.

Returns:

A string representing the language code if successful, undefined if none specified, error otherwise.

GetUser

Deprecated
RecArray GetUser( UAPISESSION session,
                  String userName )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.GetUserByID().

Parameters

session

The UAPISession through which the information is retrieved.

userName

The name of the user for which the information is retrieved.

Returns:

A RecArray containing only one record for the specified user if successful, error otherwise.

GetUserByID

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:

Parameters

session

The UAPISession through which the information is retrieved.

ID

The UAPI ID of the user for which the information is retrieved.

Returns:

A RecArray containing only one record for the specified user if successful, error otherwise.

GetUserLanguage

Dynamic GetUserLanguage( CAPILOGIN login )

Get the user's preferred metadata language.

Parameters

login

The CAPILogin through which the information is retrieved.

Returns:

A string representing the language code if successful, error otherwise.

LeaderList

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().

Parameters

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.

Returns:

A RecArray containing one record for each user or group for which the specified user or group is the leader.

List

RecArray List( UAPISESSION session,
               Integer theType,
               [Integer spaceID] )

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().

Parameters

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.

Returns:

A RecArray containing records of users or groups if successful, error otherwise.

ListUserProxysByID

RecArray ListUserProxysByID( UAPISESSION session,
                             Integer userID )

Lists the proxies for the specified user.

Parameters

session

The UAPISession through which the information is retrieved.

userID

The ID of the user.

Returns:

A RecArray containing records of users or groups if successful, error otherwise.

MembershipList

Deprecated
RecArray MembershipList( UAPISESSION session,
                         Integer memberType,
                         String memberName,
                         Integer groupType )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.MembershipListByID().

Parameters

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.

Returns:

A RecArray containing one record for each group (of the specified type) of which the user or group is a member if successful, error otherwise.

MembershipListByID

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.

Parameters

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.

Returns:

A RecArray containing one record for each group (of the specified type) of which the user or group is a member if successful, error otherwise.

PowerList

RecArray PowerList( UAPISESSION session,
                    Integer targetType,
                    Integer searchType,
                    String searchValue,
                    Integer action,
                    Integer nRows,
                    Integer searchColumn,
                    Integer searchOpr,
                    Integer startID,
                    String startValue,
                    [Integer groupID],
                    [Integer spaceID] )

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().

Parameters

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.

Returns:

A RecArray containing records of users and/or groups that satisfied the specified query criteria if successful, error otherwise.

PrefsDelete

Integer PrefsDelete( UAPISESSION session,
                     Integer ID,
                     [String keyword] )

Deletes a specified user preference keyword or all of the user preference keywords.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

PrefsGet

Dynamic PrefsGet( UAPISESSION session,
                  Integer ID,
                  String keyword,
                  [Dynamic dftValue] )

Retrieves a specified user preference value for a given keyword.

Parameters

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.

Returns:

The specified keyword's stored value if successful, error otherwise.

PrefsList

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:

Parameters

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.

Returns:

A RecArray containing one Record for each preferences keyword if successful, error otherwise

PrefsPut

Integer PrefsPut( UAPISESSION session,
                  Integer ID,
                  String keyword,
                  [Dynamic value] )

Updates the value for an existing user preference keyword or adds a new user preference keyword for the specified user. Returns an SQL error when updating an existing value with UNDEFINED.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

Rename

Deprecated
Integer Rename( UAPISESSION session,
                Integer theType,
                String currentName,
                String newName )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.RenameByID().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

RenameByID

Integer RenameByID( UAPISESSION session,
                    Integer ID,
                    String newName )

Renames a user or group.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

RightsList

Deprecated
RecArray RightsList( UAPISESSION session,
                     Integer theType,
                     String name,
                     [Integer proxyType] )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.RightsListByID().

Parameters

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.

Returns:

A RecArray containing one record for each group the user or group is a member of if successful, error otherwise.

RightsListByID

RecArray RightsListByID( UAPISESSION session,
                         Integer ID,
                         [Integer proxyType] )

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().

Parameters

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.

Returns:

A RecArray containing one record for each group the user or group is a member of if successful, error otherwise.

SetLeader

Deprecated
Integer SetLeader( UAPISESSION session,
                   Integer theType,
                   String name,
                   Integer ID )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.SetLeaderByID().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetLeaderByID

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetOwner

Deprecated
Integer SetOwner( UAPISESSION session,
                  Integer theType,
                  String name,
                  Integer ownerID )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.SetOwnerByID().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetOwnerByID

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetPWDExpireDateByID

Integer SetPWDExpireDateByID( UAPISESSION session,
                              Integer userID,
                              Date expirationDate )

Changes the password expiration date for a user.

Parameters

session

The UAPISession through which the modification is made.

userID

The ID the user.

expirationDate

The new password expiration date.

Returns:

The Integer 0 if successful, error otherwise.

SetPWDExpireModeByID

Integer SetPWDExpireModeByID( UAPISESSION session,
                              Integer userID,
                              Dynamic mode )

Changes the password expiration mode for a user.

Parameters

session

The UAPISession through which the modification is made.

userID

The ID the user.

mode

The expiration mode.

Returns:

The Integer 0 if successful, error otherwise.

SetUserData

Deprecated
Integer SetUserData( UAPISESSION session,
                     Integer theType,
                     String name,
                     Dynamic userData )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.SetUserDataByID().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetUserDataByID

Integer SetUserDataByID( UAPISESSION session,
                         Integer theType,
                         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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetUserDefaultGroup

Deprecated
Integer SetUserDefaultGroup( UAPISESSION session,
                             String userName,
                             Integer groupType,
                             String groupName )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.SetUserDefaultGroupByIDs().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetUserDefaultGroupByIDs

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetUserLanguage

Integer SetUserLanguage( CAPILOGIN login,
                         String languageCode )

Set the user's preferred metadata language.

Parameters

login

The CAPILogin with which the information is associated.

languageCode

The language code representing the user's preferred metadata language.

Returns:

The Integer 0 if successful, error otherwise.

SetUserPassword

Deprecated
Integer SetUserPassword( UAPISESSION session,
                         String userName,
                         Dynamic curPwd,
                         String newPwd )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.SetUserPasswordByID().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetUserPasswordByID

Integer SetUserPasswordByID( UAPISESSION session,
                             Integer userID,
                             Dynamic curPwd,
                             String newPwd )

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetUserPrivileges

Deprecated
Integer SetUserPrivileges( UAPISESSION session,
                           String userName,
                           Integer privileges )

This function assumes it operates in the standard space (with spaceID of 0).

Use UAPI.SetUserPrivilegesByID().

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

SetUserPrivilegesByID

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.

Parameters

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.

Returns:

The Integer 0 if successful, error otherwise.

UserList

RecArray UserList( UAPISESSION session,
                   [Integer spaceID],
                   [Integer brevity] )

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:

Parameters

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.

Returns:

A RecArray containing records of users if successful, error otherwise.

 Copyright © 2023 OpenText Corporation. All rights reserved.