users.Update
Overview¶
Update the specified user in Server Script.
Methods¶
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | long | Yes | Specify the user ID to update. |
| user | string | Yes | Specify the user information to update as a JSON string. For what to specify, see "JSON Data Layout: User". |
Usage Examples¶
The following example updates the name, department, and extended columns of user ID 11.
const userId = 11;
const data = {
Name: 'Taro Tanaka',
DeptId: 3,
ClassHash: {
ClassA: 'test-class-column'
},
NumHash: {
NumA: 100
},
DateHash: {
DateA: '2026-08-19'
},
DescriptionHash: {
DescriptionA: 'Supplementary description'
},
CheckHash: {
CheckA: true
}
};
users.Update(userId, JSON.stringify(data));
Return Value¶
Returns true if the user is updated successfully, and false if it fails.
Cautions¶
This is a method used in "Server Script". It cannot be used in "Script".
Supported Versions¶
| Supported versions | Body |
|---|---|
| 1.5.8.0 and later | Added function |