Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
  • Properties specific to gpwUser variables
  • Functions that use the gpwUser type:
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
The gpwUser type is used to describe and modify the characteristics of a user of WEBDEV or WINDEV User Groupware.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
WEBDEV - Server code
// Values of new user
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.")
// Activate the user
SWITCH gpwActivateUser(clUser.Login)
// For an activation by email
CASE gpwActivationByEmail
// For an immediate activation
CASE gpwActivationImmédiate
// Connects the user directly
gpwConnectUser(clUser.Login, clUser.Password)
// Displays the confirmation popup
Info("Unable to activate the user.")

Properties specific to gpwUser variables

The following properties can be used to handle gpwUser variables:
NameType usedEffect
AccessRightsInteger constantUser access rights:
  • gpwRightsAddApplication: Right to add an application in the Private Store.
  • gpwRightsNone: No add rights.
EmailCharacter stringUser's email address.
  • True if the user is enabled,
  • False otherwise.
FirstNameCharacter stringUser's first name.
IDExternalCharacter stringIdentifier of the user in a database external to the groupware. This property can be used for example to link the user of the User Groupware of the User file of the application that uses the groupware by referencing its identifier.
LastNameCharacter stringUser's last name.
LoginCharacter stringUsername.
PasswordCharacter stringUser password.
This password is not retuned when gpwGetUserInfo is used to get the user information.
  • True if users must enter their password the first time they log in,
  • False otherwise.
PhoneCharacter stringUser's phone number.
  • True if the user is supervisor,
  • False otherwise.
TOTPKeyCharacter stringTOTP key linked to the user for the two-factor authentication.
Remark: This property is only taken into account for the User Groupware in WDBaaS mode and the Private Store.
TrustListBufferIf the two-factor authentication is turned on, the user can indicate that the current computer is a trusted computer. This property lists all user-defined trusted devices, computers and browsers.
Remark: Users can remove trusted computers in the user profile of the User Groupware.
TwoFactorAuthenticationIntegerTwo-factor authentication management mode:
  • 0: Two-factor authentication turned off. Two-factor authentication is turned off for the user and is not required.
  • 1: Two-factor authentication turned on. Two-factor authentication is turned on for the user.
  • 2: The two-factor authentication must be turned on. Two-factor authentication is required but it is turned off.
Remark: This property is only taken into account for the User Groupware in WDBaaS mode and the Private Store.

Functions that use the gpwUser type:

gpwAddUserAdds a user to the User Groupware database.
gpwFindUserRetrieves the characteristics of a user of the user groupware.
gpwGetUserInfoRetrieves information about the current user (application that uses the User Groupware).
gpwModifyUserModifies a user in the database of user groupware.
Minimum version required
  • Version 19
This page is also available for…
Click [Add] to post a comment

Last update: 09/05/2023

Send a report | Local help