Skip to main content
Version: Next

GET USER PROPERTIES

GET USER PROPERTIES ( userID ; name ; startup ; password ; nbLogin ; lastLogin {; memberships {; groupOwner}} )

ParameterTypeDescription
userIDIntegerUnique user ID number
nameTextName of the user
startupTextStartup method name
passwordTextAlways an empty string
nbLoginIntegerNumber of logins to the database (Binary databases only)
lastLoginDateDate of last login to the database (Binary databases only)
membershipsArray integerID numbers of groups to which the user belongs
groupOwnerIntegerID number of user group owner (Binary databases only)

This command is not thread-safe, it cannot be used in preemptive code.

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 GET USER LIST command.

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.

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

Notes:

  • The nbLogin and lastLogin parameters are used in binary databases only. They always return respectively 0 and 00/00/00 in project databases.
  • The password parameter is obsolete (it always returns an empty string). If you want to check a user's password, use 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.

(Binary databases only) You can pass the optional groupOwner parameter to get the ID number of the user group “owner”, i.e. the default owner group of the objects created by this user.

Note: The groupOwner array always returns 0 values in project databases.

Note for binary databases: Group and user ID values depend on their creator (Designer, Administrator, or affiliated group owner). For more information, please refer to the User and group ID ranges paragraph.

Error management

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.

See also

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