4D v14.3Set user properties |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
Set user properties
Set user properties
Set user properties lets you change and update the properties of an existing user account whose unique user ID number you pass in userID, or add a new user affiliated with the Designer or the Administrator. If you are changing the properties of an existing user account, 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 Set user properties. User ID numbers can have the following values or ranges:
To add a new user affiliated with the Designer pass -1 in userID. To add a new user affiliated with the Administrator pass -2 in userID. If you do not pass -1, -2 or a valid user ID number, Set user properties does nothing. Before the call, you pass the new name, startup method, password, number of logins and date of last login for the user, in the name, startup, password, nbLogin and lastLogin parameters.You pass an unencrypted password in the password parameter. 4D will encrypt it for you before saving it in the user account. If you do not want to change all the properties of the user (aside from the memberships, see below), first call GET USER PROPERTIES and pass the returned values for the properties you want to leave unchanged. If you do not want to change the password for an account, pass the * symbol as a value for the password parameter. This allows you to change the other properties of the user account without changing the password for the account. If you do not pass the optional memberships parameter, the current memberships of the user are left unchanged. If you do not pass memberships when adding a user, the user will not belong to any group. If you pass the optional groupOwner parameter, you indicate 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:
To revoke all the memberships of a user, pass an empty memberships array. If you do not have the proper access privileges for calling Set 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
HISTORY
Modified: 4D 2004 SEE ALSO
DELETE USER ARTICLE USAGE
4D Language Reference ( 4D v11 SQL Release 6) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||