4D v13.4

GET USER PROPERTIES

Home

 
4D v13.4
GET USER PROPERTIES

GET USER PROPERTIES 


 

GET USER PROPERTIES ( userID ; name ; startup ; password ; nbLogin ; lastLogin {; memberships {; groupOwner}} ) 
Parameter Type   Description
userID  Longint in Unique user ID number
name  String in Name of the user
startup  String in Startup method name
password  String in Always an empty string
nbLogin  Longint in Number of logins to the database
lastLogin  Date in Date of last login to the database
memberships  Longint array in ID numbers of groups to which the user belongs
groupOwner  Longint in ID number of user group owner

GET USER PROPERTIES returns the information about the user whose unique user ID number you pass in userID. You must pass a valid user ID number returned by the command GET USER LIST.

If the user account does not exist or has been deleted, the error -9979 is generated. You can catch this error with an error-handling method installed using ON ERR CALL. Otherwise, you can call Is user deleted to test the user account before calling GET USER PROPERTIES.

User ID numbers can have the following values or ranges:

User ID number User description
1Designer user
2Administrator user
3 to 15000User created by the Designer of the database
(user #3 is the first user created by the Designer, user #4 the second, and so on).
-11 to -15000User created by the Administrator of the database
(user #-11 is the first user created by the Designer, user #-12 is the second, and so on).

After the call, you retrieve the name, startup method, encrypted password, number of logins and date of last login for the user, in the parameters name, startup, password, nbLogin and lastLogin.

Note: GET USER PROPERTIES no longer returns the encrypted password in the password parameter. Starting with version 6.0.2, an empty string is always returned in this parameter. To check the password of a user, call the Validate password function.

If you pass the optional memberships parameter, the unique ID numbers of the groups to which the user belongs are returned. Group ID numbers can have the following ranges:

If you pass the optional groupOwner parameter, you get the ID number of the user group “owner”, i.e. the default owner group of the objects created by this user.

The group ID numbers can be the following:

Group ID number Group description
15001 to 32767Group created by the Designer or affiliated Group Owner
(group #15001 is the first group created by the Designer, group #15002 the second, and so on).
-15001 to -32768Group created by the Administrator or affiliated Group Owner
(group #-15001 is the first group created by the Administrator, group #-15002 the second, and so on).

If you do not have the proper access privileges for calling GET USER PROPERTIES or if the Password system is already accessed by another process, an access privilege error is generated. You can catch this error with an error-handling method installed using ON ERR CALL.

 
PROPERTIES 

Product: 4D
Theme: Users and Groups
Number: 611

This command modifies the Error system variable

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D 2004

 
SEE ALSO 

GET GROUP LIST
GET USER LIST
Is user deleted
Set user properties
Validate password