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
Validates a new user in the User Groupware database by activating the user.
Depending on the new user validation mode defined on the administration page, you can:
  • send an email to the user asking them to click a link to validate their subscription,
  • validate the user directly.
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
IF gpwAddUser(clUser) = False THEN
	Info("Unable to add the user.")
	RETURN
END

// Activate the user
SWITCH gpwActivateUser(clUser.Login)
	// Activate by email
	CASE gpwActivationByEmail
		PopupDisplay(POPUP_ValidateSubscription)

	// Activate immediately
	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.")
END
Syntax
<Result> = gpwActivateUser(<Identifier>)
<Result>: Integer constant
Activation result:
gpwActivationByEmailThe user is activated by email. An email is automatically sent (the email characteristics are defined in the administration page).
gpwActivationImmediateThe user is immediately activated.
gpwErrorActivation error.
<Identifier>: Character string
Username or user's email address.
Remarks
If an error occurs, the ErrorOccurred variable is set to True.
Business / UI classification: Neutral code
Component: wd300gpu.dll
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 04/23/2024

Send a report | Local help