version 2004 (Modified)
GET USER PROPERTIES (userID; name; startup; password; nbLogin; lastLogin{; memberships{; groupOwner}})
Parameter | Type | Description | |
userID | Number | Unique user ID number | |
name | String | Name of the user | |
startup | String | Startup method name | |
password | String | Always an empty string | |
nbLogin | Number | Number of logins to the database | |
lastLogin | Date | Date of last login to the database | |
memberships | Numeric Array | ID numbers of groups to which the user belongs | |
groupOwner | Number | ID number of user group owner |
Description
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 |
1 | Designer user |
2 | Administrator user |
3 to 15000 | User 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 -15000 | User 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 32767 | Group 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 -32768 | Group 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). |
See Also
GET GROUP LIST, GET USER LIST, Set user properties, Validate password.
Error Handling
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.