PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Connects a user to the user groupware.
Example
Syntax

Connect a user to the user groupware Hide the details

<Result> = gpwConnectUser(<Login> , <Password>)
<Result>: Integer constant
Result of the connection:
gpwErrorAn error occurred. To get the details of the error, use ErrorInfo.
gpwInvalidPasswordThe user password is unknown.
gpwOKThe user was connected.
gpwUnknownUserThe user is unknown: it is not found in the database of user groupware.
<Login>: Character string (with quotes)
User login.
<Password>: Character string (with quotes)
Password associated with the user login.
Versions 24 and later

Connect an identified user to the user groupware via an email address Hide the details

<Result> = gpwConnectUser(<User email>)
<Result>: Integer constant
Result of the connection:
gpwErrorAn error occurred. To get the details of the error, use ErrorInfo.
gpwInvalidPasswordThe user password is unknown.
gpwOKThe user was connected.
gpwUnknownUserThe user is unknown: it is not found in the database of user groupware.
<User email>: Character string (with quotes)
User email retrieved when authenticating via OpenID (property ..Email of the variable OpenIDIdentity).
New in version 24

Connect an identified user to the user groupware via an email address Hide the details

<Result> = gpwConnectUser(<User email>)
<Result>: Integer constant
Result of the connection:
gpwErrorAn error occurred. To get the details of the error, use ErrorInfo.
gpwInvalidPasswordThe user password is unknown.
gpwOKThe user was connected.
gpwUnknownUserThe user is unknown: it is not found in the database of user groupware.
<User email>: Character string (with quotes)
User email retrieved when authenticating via OpenID (property ..Email of the variable OpenIDIdentity).

Connect an identified user to the user groupware via an email address Hide the details

<Result> = gpwConnectUser(<User email>)
<Result>: Integer constant
Result of the connection:
gpwErrorAn error occurred. To get the details of the error, use ErrorInfo.
gpwInvalidPasswordThe user password is unknown.
gpwOKThe user was connected.
gpwUnknownUserThe user is unknown: it is not found in the database of user groupware.
<User email>: Character string (with quotes)
User email retrieved when authenticating via OpenID (property ..Email of the variable OpenIDIdentity).
Business / UI classification : Neutral code
Component : wd260gpu.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