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 cellnameCellname where the entityid or authobjectid can be found
RECORD ARRAY inputThe RECORD ARRAY to enrich, must contain a cell named 'userid' with the ID of the user.
RECORD optionsOptions
STRING celltypeType of the cell referred by cellname, "authobjectid"/"entityid"/"guid", defaults to "entityid"
BOOLEAN defaultfieldsIf not passed or TRUE, add default fields ('firstname', 'lastname', 'fullname', 'login', 'email' and 'entityid')
extrafieldsRecord/string with extra outputcolumns
BOOLEAN rightouterjoinIf TRUE, don't remove records with non-existing users, but add the fields with default value.
Return value
RECORD ARRAYReturns the given array enriched with login, realname, firstname, lastname and optional fields
STRING displaynameThe displayname as normally returned by GetUserDisplayName
STRING emailThe user's email address
STRING entityidThe user's entity id
STRING firstnameThe user's first name
STRING fullnameThe user's full name (as stored in wrd_title)
STRING lastnameThe user's last name
STRING loginThe 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'.