QuickBooks Integrator 2020 Qt Edition

Questions / Feedback?

AddUser Method

Adds a new user to the AuthorizedUsers collection.

Syntax

int AddUser(const QString& qsUser, const QString& qsPassword, const QString& qsQBConnectionString, int iAuthMode);

Remarks

Please refer to the AuthorizedUsers collection for more information.

User specifies the user which will be allowed to connect.

Password specifies the password of the user. This is not applicable when AuthMode is set to 1 (amWindows).

QBConnectionString sets the connection properties for the user. See AuthorizedUserQBConnectionString for details.

AuthMode defines how the user will be authenticated. There are two ways that the user may be authorized, against the user list defined in the class, or as a Windows user. From the client side the process of connecting is exactly the same no matter which option you choose. Possible values are:

0 (amNormal - default) The user is authenticated against the user list defined in the class.
1 (amWindows) The user is authenticated as a Windows user.

When using the amNormal AuthMode (default) the user's password will be checked against the Password property.

When using the amWindows AuthMode the class will validate the user's credentials with Windows. When calling AddUser the Password parameter should be set to empty string.

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2021 /n software inc. - All rights reserved.
QuickBooks Integrator 2020 Qt Edition - Version 20.0 [Build 7941]