|
gpwLogin (Function) In french: gpwLogin Connects a user to an application that is using the user groupware. This function checks whether the user is registered in the database of user groupware. If the user is identified, the application is automatically started by using the rights defined for this user. Remark: No login window is automatically opened: the login and password are directly passed in parameter to the function. The login and password could have been entered in a custom connection window (see the example).
// Retrieve the login in a custom window Login is string Password is string Open(WIN_MyLoginWindow, Login, Password) // Check the login nRes is int = gpwLogin(Login, Password) // If the login failed IF nRes <> gpwOk THEN SWITCH nRes CASE gpwError: Error("Error while initializing the groupware.") CASE gpwUnknownUser: Error("Unknown user.") CASE gpwInvalidPassword: Error("Invalid password") END EndProgram() END // Retrieve the first name of user FirstName is string = gpwGetUserInfo(gpwInfoFirstName) Info("Welcome" + FirstName)
Syntax Versions 19 and later
Directly connect a user to an application via the user groupware Hide the details
<Result> = gpwLogin(<Name> , <Password> [, <Directory of groupware files>])
<Result>: Integer constant Result of the connection: | | Versions 19 and latergpwManagement New in version 19gpwManagement gpwManagement | The groupware in management mode. | gpwCancel | The "Cancel" button was clicked by the user. | gpwError | An error occurred. For details, use function ErrorInfo. | gpwInvalidPassword | The password is not valid. It does not correspond to the user password described in the groupware database. | gpwOk | The user is connected | gpwUnknownUser | The user is not referenced in the database of user groupware. |
<Name>: Character string (with quotes) Login of user. <Password>: Character string (with quotes) Password associated with the login of the user, empty string (" ") if no password. <Directory of groupware files>: Optional character string (with quotes) These data files are used to manage the users and their rights. By default, these data files are created in a subdirectory of your project (EXE\GPW_<Project name> directory). If this parameter corresponds to an empty string ("") or if it is not specified, the default directory of the user groupware will be used. New in version 19
Directly connect a user to an application via the user groupware Hide the details
<Result> = gpwLogin(<Name> , <Password> [, <Directory of groupware files>])
<Result>: Integer constant Result of the connection: | | Versions 19 and latergpwManagement New in version 19gpwManagement gpwManagement | The groupware in management mode. | gpwCancel | The "Cancel" button was clicked by the user. | gpwError | An error occurred. For details, use function ErrorInfo. | gpwInvalidPassword | The password is not valid. It does not correspond to the user password described in the groupware database. | gpwOk | The user is connected | gpwUnknownUser | The user is not referenced in the database of user groupware. |
<Name>: Character string (with quotes) Login of user. <Password>: Character string (with quotes) Password associated with the login of the user, empty string (" ") if no password. <Directory of groupware files>: Optional character string (with quotes) These data files are used to manage the users and their rights. By default, these data files are created in a subdirectory of your project (EXE\GPW_<Project name> directory). If this parameter corresponds to an empty string ("") or if it is not specified, the default directory of the user groupware will be used.
Directly connect a user to an application via the user groupware Hide the details
<Result> = gpwLogin(<Name> , <Password> [, <Directory of groupware files>])
<Result>: Integer constant Result of the connection: | | Versions 19 and latergpwManagement New in version 19gpwManagement gpwManagement | The groupware in management mode. | gpwCancel | The "Cancel" button was clicked by the user. | gpwError | An error occurred. For details, use function ErrorInfo. | gpwInvalidPassword | The password is not valid. It does not correspond to the user password described in the groupware database. | gpwOk | The user is connected | gpwUnknownUser | The user is not referenced in the database of user groupware. |
<Name>: Character string (with quotes) Login of user. <Password>: Character string (with quotes) Password associated with the login of the user, empty string (" ") if no password. <Directory of groupware files>: Optional character string (with quotes) These data files are used to manage the users and their rights. By default, these data files are created in a subdirectory of your project (EXE\GPW_<Project name> directory). If this parameter corresponds to an empty string ("") or if it is not specified, the default directory of the user groupware will be used.
Syntax of the former user groupware (kept for backward compatibility) Hide the details
<Result> = gpwLogin(<Name> , <Password> [, <Directory of rights file> [, <Directory of user files>]])
<Result>: Integer constant Result of the connection: | | gpwCancel | The "Cancel" button was clicked by the user. | gpwError | An error occurred. For details, use function ErrorInfo. | gpwInvalidPassword | The password is not valid. It does not correspond to the user password described in the groupware database. | gpwOk | The user is connected | gpwUnknownUser | The user is not referenced in the database of user groupware. |
<Name>: Character string (with quotes) Login of user. <Password>: Character string (with quotes) Password associated with the login of the user, empty string (" ") if no password. <Directory of rights file>: Optional character string (with quotes) These data files are used to manage the rights granted to the users for the different windows of the application. These files are specific to the application. By default, these data files are created in a subdirectory of your project (EXE\GPW_<Project name> directory).
If this parameter corresponds to an empty string ("") or if it is not specified, the default directory of the user groupware will be used. <Directory of user files>: Optional character string (with quotes) These data files can be common to several applications. By default, these data files are created in a subdirectory of your project (EXE\GPW_<Project name> directory). You can define the location of the user groupware files common to several applications. In this case, you must specify the path of data files to use.
If this parameter corresponds to an empty string ("") or if it is not specified, the default directory of the user groupware will be used. Business / UI classification : Neutral code
This page is also available for…
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |