Deprecated. This function will continue to work, but a newer version is available at updateMember().
Updates a member's properties.
The updateMember()
function returns a Promise that resolves to a member object
when the specified member is updated.
Note: The updated Member object contains only the fields that were explicity added to the Member object. Custom Contact fields are not automatically added to the Member object. They must be added to the Member object by the site owner.
Only the requested fields are updated.
Note:
Updating the contactDetails.addresses
, contactDetails.emails
, or contactDetails.phones
array
overwrites the entire array,
so any existing values you want to retain must be passed in the updateMember()
call
along with the new values to add.
However, passing an empty array will have no effect, and these functions must be used to clear all data from the respective array:
contactDetails.addresses
, use deleteMemberAddresses()
.contactDetails.emails
, use deleteMemberEmails()
.contactDetails.phones
, use deleteMemberPhones()
.If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to updateMember().
To migrate to the new function:
Add the new import statement:
Test your changes to make sure your code behaves as expected.
Member ID.
Member details to update.