ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Connects a user to an application that uses the User Groupware. This function checks whether the user is registered in the database of the 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: login and password are directly passed as parameters to function. The login and password could have been entered in a custom connection window (see the example).
Example
// Récupération du login dans une fenêtre perso
Login is string
MotPasse is string
Open(FEN_MaFenetreLogin, Login, MotPasse)
// Vérification du login
nRes is int = gpwLogin(Login, MotPasse)
// Si le login a échoué
IF nRes <> gpwOk THEN
	SWITCH nRes
		CASE gpwError: Error("Erreur à l'initialisation du groupware.")
		CASE gpwUnknownUser: Error("Utilisateur inconnu.")
		CASE gpwInvalidPassword: Error("Mot de passe invalide.")
	END
	EndProgram()
END
// Récupération du prénom de l'utilisateur
Prenom is string = gpwRecupInfoUtilisateur(gpwInfoFirstName)
Info("Bienvenue" + Prenom)
Syntax

Directly connect a user to an application via the User Groupware Hide the details

<Result> = gpwLogin(<Name> , <Password> [, <Groupware files directory>])
<Result>: Integer constant
Result of the connection:
gpwCancelThe "Cancel" button was clicked by the user.
gpwErrorAn error occurred. For more details, use the ErrorInfo function.
gpwInvalidPasswordThe password is not valid. It does not match the user password defined in the groupware database.
gpwManagementThe groupware in management mode.
gpwOkThe user is logged in
gpwUnknownUserThe user is not listed in the User Groupware database.
<Name>: Character string
Username.
<Password>: Character string
Password associated with the login of the user, empty string (" ") if no password.
<Groupware files directory>: Optional character string
These data files are used to manage 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 is an empty string ("") or 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> [, <Rights file directory> [, <User files directory>]])
<Result>: Integer constant
Result of the connection:
gpwCancelThe "Cancel" button was clicked by the user.
gpwErrorAn error occurred. For more details, use the ErrorInfo function.
gpwInvalidPasswordThe password is not valid. It does not match the user password defined in the groupware database.
gpwOkThe user is logged in
gpwUnknownUserThe user is not listed in the User Groupware database.
<Name>: Character string
Username.
<Password>: Character string
Password associated with the login of the user, empty string (" ") if no password.
<Rights file directory>: Optional character string
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 is an empty string ("") or is not specified, the default directory of the User Groupware will be used.
<User files directory>: Optional character string
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 the data files to be used.

If this parameter is an empty string ("") or is not specified, the default directory of the User Groupware will be used.
Business / UI classification: Neutral code
Component: wd300gpu.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help