# EsbCreateUser

Description

EsbCreateUser() creates a new user.

Syntax

    EsbCreateUser (hCtx, userName, Password)

    ByVal hCtx     As Long
    ByVal userName As String
    ByVal Password As String

Parameters

hCtx | Essbase VB API context handle.
userName | Name of user to create. User names can be 30 characters long.
Password | Security password for new user. Passwords can be 100 characters long.

Return Value

None.

Notes

- The specified user must not already exist.
- The user's access level and other parameters may be set with the EsbSetUser() function.
- You program should ensure that the password has been entered correctly (e.g. by requiring the user to type it twice) before calling this function. Once entered, it is not possible to retrieve a password. However, a password can be changed using the EsbSetPassword() function.

Access

This function requires the caller to have Create/Delete User privilege (ESB_PRIV_USERCREATE) for the logged in server.

Example

    Declare Function EsbCreateUser Lib "ESBAPIW" (ByVal hCtx As Long, ByVal User As String, ByVal Password As String) As Long

    Sub ESB_CreateUser ()
       Dim sts As Long
       Dim User As String
       Dim Password As String

       User = "Joseph"
       Password = "Password"

       '************
       ' Create user
       '************
       sts = EsbCreateUser (hCtx, User, Password)
    End Sub

See Also

EsbDeleteUser()
EsbListUsers()
EsbRenameUser()
EsbSetPassword()
EsbSetUser()