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
Logs a user in to the User Groupware.
Example
WEBDEV - Server code
// Connexion de l'utilisateur
nValeurRenvoyee is int = gpwConnectUser(SAI_Login, SAI_MotPasse)

// Si échec de connexion
IF nValeurRenvoyee <> gpwOk THEN
	SWITCH nValeurRenvoyee
		CASE gpwError : Error("Connexion impossible.")
		CASE gpwUnknownUser, gpwInvalidPassword : 
				Error("Utilisateur ou mot de passe incorrect.")
	END
ELSE
	// Connexion en administrateur
	IF gpwGetUserInfo(gpwInfoSupervisor) THEN
		// Ouvre la page d'administration du groupware
		gpwOpenConfiguration()
		// Actualise la page
	ELSE
		PageUse(MyPage..Name)
	END
END
Syntax

Logging a user in to the User Groupware Hide the details

<Result> = gpwConnectUser(<Username> , <Password>)
<Result>: Integer constant
Result of the connection:
gpwErrorAn error occurred. To get more details on the error, use ErrorInfo.
gpwInvalidPasswordThe user password is unknown.
gpwOKThe user was logged in.
gpwUnknownUserThe user is unknown: it is not present in the User Groupware database.
<Username>: Character string
Username.
<Password>: Character string
Password associated with the username.

Logging a user in to the User Groupware using their email address Hide the details

<Result> = gpwConnectUser(<User's email address>)
<Result>: Integer constant
Result of the connection:
gpwErrorAn error occurred. To get more details on the error, use ErrorInfo.
gpwInvalidPasswordThe user password is unknown.
gpwOKThe user was logged in.
gpwUnknownUserThe user is unknown: it is not present in the User Groupware database.
<User's email address>: Character string
User email retrieved in an OpenID authentication (Email property of the OpenIDIdentity variable).
Business / UI classification: Neutral code
Component: wd300gpu.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Example ok
//SENHACRIPT = password in table GPU_User.password

// Connect the user
nReturnedValue is int = gpwConnectUser(LOGINUSER, SENHACRIPT)
// If connection failure
IF nReturnedValue <> gpwOk AND nReturnedValue <> 0
SWITCH nReturnedValue
CASE gpwError: Error("Unable to connect.")
CASE gpwUnknownUser, gpwInvalidPassword:
Error("Invalid user or password.")
END
ELSE IF nReturnedValue = gpwOk AND nReturnedValue = 0
// Connect as administrator
IF gpwGetUserInfo(gpwInfoSupervisor) = True
// Opens the page for groupware management
gpwOpenConfiguration()
// Refreshes the page
ELSE
PageUse(MyPage..Name)
END
END
BOLLER
25 Jan. 2017

Last update: 03/27/2025

Send a report | Local help