Userhandling ¶ UserMgrUserAdd (Function) UserMgrUserAddInfoToUser (Function) UserMgrUserGetFirst (Function) UserMgrUserGetInfoOfUser (Function) UserMgrUserGetName (Function) UserMgrUserGetNext (Function) UserMgrUserGetProperty (Function) UserMgrUserRemove (Function) UserMgrUserRemoveInfoFromAllUsers (Function) UserMgrUserRemoveInfoFromUser (Function) UserMgrUserSetCredentials (Function) UserMgrUserSetProperty (Function)
UserMgrUserAdd (FUN) ¶ FUNCTION UserMgrUserAdd : RTS_IEC_RESULT Add a new user to the user database InOut: Scope Name Type Comment Return UserMgrUserAdd RTS_IEC_RESULT Error code ERR_OK: User could be added ERR_DUPLICATE: User already exists ERR_PARAMETER: Invalid parameter. pszUser empty ERR_NOMEMORY: No memory available to store new user ERR_NOTINITIALIZED: The user management is not initialized or it is not loaded yet ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user Inout Const pszUser STRING User name, limited to 59 chars pCredentials UserMgrCredentials Credentials, only password is available so far, password (plain text) is limited to 59 chars
UserMgrUserAddInfoToUser (FUN) ¶ FUNCTION UserMgrUserAddInfoToUser : RTS_IEC_RESULT Adds an value to an logged in user. This can be used as some kind of cache that exists as long as the user is logged in. InOut: Scope Name Type Comment Return UserMgrUserAddInfoToUser RTS_IEC_RESULT ERR_OK: Value cached; ERR_DUPLICATE: The same key has been used already; ERR_FAILED: The caching failed Input hUser RTS_IEC_HANDLE Handle to authorized user key __XWORD Access key for the cache value. This has to be used at UserMgrGetInfoOfUser to access the value. value UserMgrCacheValue Value to cache at the user.
UserMgrUserGetFirst (FUN) ¶ FUNCTION UserMgrUserGetFirst : RTS_IEC_RESULT Iteration interface to get the first user InOut: Scope Name Type Comment Return UserMgrUserGetFirst RTS_IEC_RESULT Error code ERR_OK: First user available ERR_NO_OBJECT: No user configured ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user Inout phIterator RTS_IEC_HANDLE Iteration handle to use with UserMgrUserGetNext() pszUsername STRING(59) Buffer to store the name, 59 chars max Output UserProperty DWORD User properties. See category ‘User and group properites’
UserMgrUserGetInfoOfUser (FUN) ¶ FUNCTION UserMgrUserGetInfoOfUser : DWORD Retrieves the value cached using UserMgrAddInfoToUser. InOut: Scope Name Type Comment Return UserMgrUserGetInfoOfUser DWORD ERR_OK: Retrieving cache value successful; ERR_PARAMETER: Some parameter is invalid; ERR_NO_OBJECT: No cache value with this key available. Input hUser RTS_IEC_HANDLE Handle to authorized user key __XWORD Key of the cache value. Output value UserMgrCacheValue Value from the cache
UserMgrUserGetName (FUN) ¶ FUNCTION UserMgrUserGetName : RTS_IEC_RESULT Get user name from a user handle InOut: Scope Name Type Comment Return UserMgrUserGetName RTS_IEC_RESULT Error code ERR_OK: User name copied ERR_INVALID_HANDLE: hUser not a valid user handle. Input hUser RTS_IEC_HANDLE Handle to authorized user Inout pszUsername STRING(59) Buffer to store the name, 59 chars max
UserMgrUserGetNext (FUN) ¶ FUNCTION UserMgrUserGetNext : RTS_IEC_RESULT Iteration interface to get next user. Must be started with UserMgrUserGetFirst() InOut: Scope Name Type Comment Return UserMgrUserGetNext RTS_IEC_RESULT Error code ERR_OK: Next user available ERR_NO_OBJECT: No next user available ERR_PARAMETER: Invalid iterator handle ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user Inout phIterator RTS_IEC_HANDLE Iteration handle to use with next call to UserMgrUserGetNext() pszUsername STRING(59) Buffer to store the name, 59 chars max Output UserProperty DWORD User properties. See category ‘User and group properites’
UserMgrUserGetProperty (FUN) ¶ FUNCTION UserMgrUserGetProperty : DWORD Get properties of a user InOut: Scope Name Type Comment Return UserMgrUserGetProperty DWORD The users properties. See category ‘User and group properites’ Input hUser RTS_IEC_HANDLE Handle to authorized user Inout Const pszUser STRING User name, limited to 59 chars Output Result RTS_IEC_RESULT Error code ERR_OK: Properties could be retrieved ERR_NO_ACCESS_RIGHTS: User not authorized
UserMgrUserRemove (FUN) ¶ FUNCTION UserMgrUserRemove : RTS_IEC_RESULT Remove user from the user database InOut: Scope Name Type Comment Return UserMgrUserRemove RTS_IEC_RESULT Error code ERR_OK: User could be removed ERR_PARAMETER: Invalid parameter. pszUser empty ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user Inout Const pszUser STRING User name, limited to 59 chars
UserMgrUserRemoveInfoFromAllUsers (FUN) ¶ FUNCTION UserMgrUserRemoveInfoFromAllUsers : DWORD Removes a specific cache value from all logged in users. InOut: Scope Name Type Comment Return UserMgrUserRemoveInfoFromAllUsers DWORD ERR_OK: Removing cache value successful ERR_NO_OBJECT: No cache value with this key available ERR_FAILED: Removing cache value failed Input key __XWORD Key of the cache value.