ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
  • Properties specific to gpwUser variables
  • Functions that use the gpwUser type:
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
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.
Example
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.")
RETURN
END
 
// Activate the user
SWITCH gpwActivateUser(clUser.Login)
// For an activation by email
CASE gpwActivationByEmail
PopupDisplay(POPUP_ValidateSubscription)
 
// For an immediate activation
CASE gpwActivationImmédiate
// 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
Remarks

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.
EnabledBoolean
  • 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.
PasswordToEnterBoolean
  • True if users must enter their password the first time they log in,
  • False otherwise.
PhoneCharacter stringUser's phone number.
SupervisorBoolean
  • 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…
Comments
Click [Add] to post a comment

Last update: 09/05/2023

Send a report | Local help