PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
WEBDEV - Server code
// Connect the user
nReturnedValue is int = gpwConnectUser(EDT_Login, EDT_Password)

// If connection failure
IF nReturnedValue <> gpwOk THEN
SWITCH nReturnedValue
CASE gpwError: Error("Unable to connect.")
CASE gpwUnknownUser, gpwInvalidPassword:
Error("Invalid user or password.")
END
ELSE
// Connect as administrator
IF gpwGetUserInfo(gpwSupervisorInfo) THEN
// Opens the page for groupware management
gpwOpenConfiguration()
// Refreshes the page
ELSE
PageUse(MyPage..Name)
END
END
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 find out the error details, 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)
Login of user.
<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 find out the error details, 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 find out the error details, 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 find out the error details, 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).
Component : wd240gpu.dll
Minimum required version
  • 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
Jan. 25 2017