Sets a user information structure, which contains security information for the user.
Syntax
ESS_FUNC_M EssSetUser (hCtx, pUserInfo);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
pUserInfo | ESS_USERINFO_T, ESS_GROUPINFO_T | 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 the description of the ESS_USERINFO_T structure 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
Returns zero (0) if successful.
Access
This function requires the caller to have Create/Delete User privilege (ESS_PRIV_USERCREATE) for the logged in server.
Example
ESS_FUNC_M ESS_SetUser (ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_USERINFO_T User; strcpy(User.Name,"Jim Smith"); strcpy(User.AppName,"Sample"); strcpy(User.DbName,"Basic"); User.Access = ESS_ACCESS_SUPER; sts = EssSetUser (hCtx,&User); return (sts); }
See Also