Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Fix field name for customFields in updateOwnBasicInfo (#1843)
Browse files Browse the repository at this point in the history
* Fix field name for customFields in updateOwnBasicInfo

* Update updateownbasicinfo.md

Co-authored-by: Martin Schoeler <martin.schoeler@rocket.chat>
  • Loading branch information
HugoHeneault and MartinSchoeler committed Mar 4, 2021
1 parent c0a4bfe commit df4c02a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/rest-api/methods/users/updateownbasicinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
| :--- | :--- | :--- |
| `/api/v1/users.updateOwnBasicInfo` | `yes` | `POST` |

Note that to update the password or email for the user you must send `currentPassword` property encrypted in SHA256 together in payload.
**Note**

* To update the password or email for the user you must send `currentPassword` property encrypted in SHA256 together in payload.
* To save customFields you must first define the customFields in admin panel (Accounts -> Registration -> Custom fields)

**WARNING:** This API does not work when the server contains custom fields. There's a bug report [here](https://github.com/RocketChat/Rocket.Chat/issues/11154) related to that.

Expand All @@ -17,7 +20,7 @@ Note that to update the password or email for the user you must send `currentPas
| `data.username` | `example` | Optional | The username for the user. |
| `data.currentPassword` | `5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5@w0rd` | Optional | The password for the user encrypted in SHA256. |
| `data.newPassword` | `passw0rd` | Optional | The new password for the user |
| `data.customFields` | `{ twitter: '@example' }` | Optional Default: `undefined` | Any custom fields the user should have on their account. |
| `customFields` | `{ twitter: '@example' }` | Optional Default: `undefined` | Any custom fields the user should have on their account. |

## Example Call

Expand Down

0 comments on commit df4c02a

Please sign in to comment.