WHUserApi (open)
Webhare user API object
Syntax
LOADLIB "mod::wrd/lib/internal/userapi.whlib";
OBJECTTYPE WHUserApiVariables
- OBJECT wrdschemaAssociated WRD schema 
Properties
- PROPERTY accounttypeWRD type where users are stored 
- PROPERTY wrd_roleWRD type where roles are stored 
- PROPERTY wrd_unitWRD type where units are stored 
Functions
- INTEGER FUNCTION CreateRole(RECORD data)
- INTEGER FUNCTION CreateUnit(RECORD data)
- INTEGER FUNCTION CreateUser(RECORD data)Creates a new user 
- MACRO DeleteRole(INTEGER id)
- MACRO DeleteUnit(INTEGER id)
- MACRO DeleteUser(INTEGER id)
- RECORD ARRAY FUNCTION EnrichRoles(STRING cellname, RECORD ARRAY input, RECORD options)
- RECORD ARRAY FUNCTION EnrichUsers(STRING cellname, RECORD ARRAY input, RECORD options)Enriches the given record array with user data 
- RECORD FUNCTION GenerateOAuthAccessToken(INTEGER userid, STRING ARRAY scopes, RECORD options)
- OBJECT FUNCTION GetAnonymousUser()
- OBJECT FUNCTION GetObjectByAuthObjectId(INTEGER authobjectid)
- OBJECT ARRAY FUNCTION GetObjectsByAuthObjectId(INTEGER ARRAY authobjectids)
- OBJECT FUNCTION GetRole(INTEGER entityid)Get the role object for a role 
- INTEGER ARRAY FUNCTION GetRoleMembers(INTEGER role)Get the members of a role 
- RECORD FUNCTION GetTolliumUserByIdAndImpersonation(INTEGER entityid, STRING openas)Returns the tollium user object for a specific user, optionally opened as another user 
- OBJECT FUNCTION GetTolliumUserByLogin(STRING username)Looks up a user based on its username, returns a tollium user object 
- OBJECT FUNCTION GetTolliumUserFromEntityId(INTEGER entityid)Returns the tollium user object for a specific user 
- RECORD ARRAY FUNCTION GetTypedRecursiveAuthobjects(OBJECT ARRAY authobjs)
- OBJECT FUNCTION GetUnit(INTEGER entityid)Get the unit object for a unit 
- OBJECT FUNCTION GetUnitOf(OBJECT authobj)
- OBJECT FUNCTION GetUser(INTEGER entityid)Get the user object for a user 
- OBJECT FUNCTION GetUserByGUID(STRING guid)Get the user object for a user, by looking up the GUID of the user 
- STRING FUNCTION GetUserDisplayName(INTEGER authobjectid)Gets a user's display name 
- INTEGER ARRAY FUNCTION GetUserRoles(INTEGER user)Get the roles of a user 
- INTEGER FUNCTION LookupUnitByName(INTEGER parent, STRING unitname)Find a child unit within a parent unit 
- RECORD FUNCTION LookupUserByLogin(STRING loginname)Looks up a user based on the login name 
- RECORD ARRAY FUNCTION ResyncToSystemTables()
- MACRO SetAuthorizedUser(INTEGER entityid)Set the current authorized user 
- MACRO SetRoleMembers(INTEGER role, INTEGER ARRAY memberlist, INTEGER grantedby)Set the members of a role, removing all unmentioned members 
- MACRO SyncRoleAfterUpdate(INTEGER entityid)
- MACRO SyncUnitAfterUpdate(INTEGER entityid)
- MACRO SyncUserAfterUpdate(INTEGER entityid)
- RECORD FUNCTION TryAppPasswordLogin(STRING scope, STRING username, STRING password, BOOLEAN allownormalpassword)
- RECORD FUNCTION TryOAuthLogin(STRING access_token)
- MACRO UpdateRole(INTEGER id, RECORD data)
- MACRO UpdateUnit(INTEGER id, RECORD data)
- MACRO UpdateUser(INTEGER id, RECORD data)Updates the data of a user