Creating a Complex Password for a User (CreateComplexPassword)

Use the ICISite interface CreateComplexPassword method to generate a complex password that meets the complexity criteria specified for the site.

This method is available in EFT Server 5.0 and later.

Signature:

HRESULT CreateComplexPassword([in, optional] BSTR bstrUserName, [out, retval], BSTR *bstrPassword);

Example:

The following example generates a password that adheres to the complexity policy enforced for an existing user:

Dim strNewPassword

strNewPassword = oUserSettings.CreateComplexPassword("test")

WScript.Echo "New Password: " strNewPassword

Call oUserSettings.ChangeUserPassword("test", strNewPassword, 1)

This example illustrates how to obtain a password from the Server that meets the complexity requirements for the Setting Level that is configured as the default for the site, which is useful when creating new users:

Dim strNewPassword

strNewPassword = oUserSettings.CreateComplexPassword()

WScript.Echo "New Password: " strNewPassword

Call oUserSettings.CreateUser("test", strNewPassword, 0, "New User Description")