ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Adds a user to the User Groupware database.
Example
// New user values
clUser is gpwUser
clUser.Email = EDT_Email
clUser.Login = EDT_Login
clUser.Password = EDT_Password
clUser.LastName = EDT_LastName
clUser.FirstName = EDT_FirstName
clUser.PhoneNumber = EDT_Phone

// Add the user
nRes is int = gpwAddUser(clUser)
SWITCH nRes
	CASE gpwOk
		Info("ok")

	CASE gpwActivationByEmail
		Info("Activation by email")

	OTHER CASE
		Info("Unable to add the user." + CR + ErrorInfo())
		RETURN
END

// Activate the user
SWITCH gpwActivateUser(clUser..Login)
	// Activation by email
	CASE gpwActivationByEmail
		PopupDisplay(POPUP_ValidateSubscription)
	// Immediate activation
	CASE gpwActivationImmediate
		// Connects the user directly
		gpwConnectUser(clUser.Login, clUser.Password)
		// Displays the confirmation popup
		PopupDisplay(POPUP_ConfirmSubscription)
	OTHER CASE
		Info("Unable to activate the user." + CR + HErrorInfo())
END
Syntax
<Result> = gpwAddUser(<User>)
<Result>: Boolean or Integer constant
WINDEVWEBDEV - Server code Corresponds to a Boolean:
  • True if the user was added,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
AndroidiPhone/iPad Corresponds to an Integer constant:
gpwActivationByEmailThe user is activated by email. An email is automatically sent (the email characteristics are defined in the administration page).
gpwErrorAddition error.
gpwOkThe user is immediately activated.
<User>: gpwUser variable
Name of the gpwUser variable containing the information of the new user.
Remarks
Depending on the new user validation mode defined in the administration page, the user can be validated immediately or by email. gpwActivateUser activates the new user.
Business / UI classification: Neutral code
Component: wd300gpu.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/23/2024

Send a report | Local help