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
<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 the user.
<Password>: Character string (with quotes)
Password associated with the user login.
Components
WINDEVWEBDEV - Server code wd230gpu.dll
Linux wd230gpu.so
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