AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones del Groupware Usuario
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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).
Ejemplo
// 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 initializing groupware.")
		CASE gpwUserUnknown: Error("User unknown.")
		CASE gpwPasswordInvalid: Error("Invalid password.")
	END
	EndProgram()
END
// Retrieve the user's first name
FirstName is string = gpwGetUserInfo(gpwInfoFirstName)
Info("Welcome" + FirstName)
Sintaxis

Directly connect a user to an application via the User Groupware Ocultar los detalles

<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) Ocultar los detalles

<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.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300gpu.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local