ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
  • 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
// Valeurs du nouvel utilisateur
clUtilisateur is gpwUser
clUtilisateur.Email = SAI_Email
clUtilisateur.Login = SAI_Login
clUtilisateur.Password = SAI_MotPasse
clUtilisateur.LastName = SAI_Nom
clUtilisateur.FirstName = SAI_Prenom
clUtilisateur.PhoneNumber = SAI_Telephone
 
// Ajout de l'utilisateur
IF gpwAddUser(clUtilisateur) = False THEN
Info("Impossible d'ajouter l'utilisateur.")
RETURN
END
 
// Activation de l'utilisateur
SWITCH gpwActivateUser(clUtilisateur.Login)
// Pour une activation par email
CASE gpwActivationByEmail
PopupDisplay(POPUP_ValidationInscription)
 
// Pour une activation immédiate
CASE gpwActivationImmédiate
// Connecte directement l'utilisateur
gpwConnectUser(clUtilisateur.Login, clUtilisateur.Password)
// Affiche la popup de confirmation
PopupDisplay(POPUP_ConfirmationInscription)
 
OTHER CASE
Info("Impossible d'activer l'utilisateur.")
END
Remarks

Properties specific to gpwUser variables

The following properties can be used to handle a gpwUser variable:
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.
First nameCharacter 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.
LoginCharacter stringUsername.
nomCharacter stringUser name.
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.
TwoFactorAuthenticationentierTwo-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