Sets a user information structure, which contains security information for the user.
Syntax
EsbSetUser (hCtx, pUserInfo) ByVal hCtx As Long pUserInfo As ESB_USERINFO_T
Parameter | Description |
---|---|
hCtx | VB API context handle. |
pUserInfo | Pointer to user info structure. |
Notes
The name of the user to set is a field in the user info structure, which must always be specified.
The only fields in the user info structure which may be changed using this function are the Access, Expiration, and PwdChgNow fields (the other fields are for information only). See ESB_USERINFO_T, ESB_GROUPINFO_T for more information.
The caller cannot give the specified user any access privileges that they themselves do not already have.
The new user settings will take effect the next time the user logs in.
Return Value
None.
Access
This function requires the caller to have Create/Delete User privilege (ESB_PRIV_USERCREATE) for the logged in server.
Example
Declare Function EsbSetUser Lib "ESBAPIN" (ByVal hCtx As Long, UserInfo As ESB_USERINFO_T) As Long Sub ESB_SetUser () Dim sts As long Dim UserInfo As ESB_USERINFO_T '******************************* ' Initialize fields for UserInfo '******************************* UserInfo.Name = "Joseph" UserInfo.Type = ESB_TYPE_USER UserInfo.Access = ESB_ACCESS_SUPER UserInfo.MaxAccess = ESB_ACCESS_SUPER '************************ ' Set User Info structure '************************ sts = EsbSetUser (hCtx, UserInfo) End Sub
See Also