Sets a user's password, erasing the existing password.
Syntax
EsbSetPassword (hCtx, userName, Password) ByVal hCtx As Long ByVal userName As String ByVal Password As String
Parameter | Description |
---|---|
hCtx | VB API context handle. |
userName | User name. |
Password | New password for a user. |
Notes
To change a password, the caller must either have administrator access, or be changing their own password.
The new password takes 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, unless they are setting their own password.
Example
Declare Function EsbSetPassword Lib "ESBAPIN" (ByVal hCtx As Long, ByVal UserName As String, ByVal Password As String) As Long Sub ESB_SetPassword () Dim sts As long Dim UserName As String Dim Password As String UserName = "Joseph" Password = "NewPassword" '***************** ' Set New password '***************** sts = EsbSetPassword (hCtx, UserName, Password) End Sub
See Also