WHUserApi::EnrichUsers (open)

Enriches the given record array with user data

Syntax

LOADLIB "mod::wrd/lib/internal/userapi.whlib";

RECORD ARRAY FUNCTION EnrichUsers(STRING cellname, RECORD ARRAY input, RECORD options)

Parameters

STRING cellname

Cellname where the entityid or authobjectid can be found

RECORD ARRAY input

The RECORD ARRAY to enrich, must contain a cell named 'userid' with the ID of the user.

RECORD options

Options

STRING celltype

Type of the cell referred by cellname, "authobjectid"/"entityid"/"guid", defaults to "entityid"

BOOLEAN defaultfields

If not passed or TRUE, add default fields ('firstname', 'lastname', 'fullname', 'login', 'email' and 'entityid')

extrafields

Record/string with extra outputcolumns

BOOLEAN rightouterjoin

If TRUE, don't remove records with non-existing users, but add the fields with default value.

Return value

RECORD ARRAY

Returns the given array enriched with login, realname, firstname, lastname and optional fields

STRING displayname

The displayname as normally returned by GetUserDisplayName

STRING email

The user's email address

STRING entityid

The user's entity id

STRING firstname

The user's first name

STRING fullname

The user's full name (as stored in wrd_title)

STRING lastname

The user's last name

STRING login

The user's login name

Description

Enriches the given record array with users' login, firstname, lastname and full name based on their ID which must be given in the cell 'userid'.