member
API Support | Available since | Last updated | Output |
---|---|---|---|
5.9300 | 5.9800 | json, xml |
Description
Deletes member with specified ID plus all associated objects and replaces any member references as an author with string values.
Deleting a member is irreversible! If the clear parameter is used, it is no longer possible to even identify the comments, edits, notes and tasks associated with the user.
It performs the following operations:
- Remove group memberships
- Update the comments, edits, etc. where the member is the author by setting full name and email directly
- Remove references to the member where the member changed the status or modified a comment
- Unassign tasks to the member
- Remove the personal group/project
- Remove any OAuth client and persistent token
- Delete the profile picture
- Remove any lock
- Delete the member.
The database transaction is only committed at the end, so if an error occurs, the database isn't updated.
Deleted objects
After deletion all API calls to the following objects return a 404 HTTP error.
Object | Effect |
---|---|
Group memberships | All the memberships are deleted permanently, so the member is not listed as a former member |
Personal project | Personal groups content is also deleted |
OAuth clients | As the OAuth client no longer exists, it is no longer usable by client applications |
Tokens | All tokens are revoked immediately and deleted preventing unauthorized access |
Member data | All member data is deleted, including profile picture, preferences, bookmarks and searches |
Member | No reference to the member |
If the member is a moderator on a group, they are removed from that role and the group needs a new moderator.
Updated objects
When the member is deleted the following objects are preserved and remain accessible:
- Comments,
- Tasks,
- Notes,
- Edits,
- Versions,
- Workflows.
References to the member as an author are replaced to only retain the full name and email address of the member, or the full name is set to “Name removed” with no email if the clear parameter is used.
References to the member where they are an assignee (assignedto
), modifier (modifiedby
), or have changed the status (statuschangedby
) are removed.
For example, in the following comment:
{ "id": 13, "contentrole": "Comment", "created": "2023-07-10T19:09:43+10:00", "title": "Test", "author": { "id": 123, "firstname": "Aaron", "surname": "Andrews", "username": "aandrews", "status": "activated", "fullname": "Aaron Andrews", "email": "aaron@example.org" }, "modifiedby": { "id": 123, "firstname": "Aaron", "surname": "Andrews", "username": "aandrews", "status": "activated", "fullname": "Aaron Andrews", "email": "aaron@example.org", "date": "2023-07-11T13:13:24+10:00" }, "content":[{ "type":"application/xhtml+xml", "value":"<p>The author will be removed!</p>" }], "groups":[{ "id": 72, "name": "sample-doc" }] }
After the member “Aaron Andrews” is deleted, the comment becomes:
{ "id": 13, "contentrole": "Comment", "created": "2023-07-10T19:09:43+10:00", "title": "Test", "author": { "fullname": "Aaron Andrews", "email": "aaron@example.org" }, "content":[{ "type":"application/xhtml+xml", "value":"<p>The author will be removed!</p>" }], "groups":[{ "id": 72, "name": "sample-doc" }] }
The modifiedby
is no longer returned.
The email is only returned if the emails=all
option is used on the API. This option is only available to group managers on selected services.
Parameters
Name | Description | Required | Type | Default |
---|---|---|---|---|
clear | Whether to clear the member name and email from comments, edits, etc | no | boolean | false |
clear
The clear parameter also removes the name and email address from PageSeeder so that the member is no longer identifiable.
This parameter affects comments, edits, notes, tasks and any object associated with the member. For example, the author of comment written by a member that has been deleted appears as:
"author":{ "fullname": "Aaron Andrews", "email": "aaron@example.org" }
If the clear parameter is set to true
, then it is:
"author":{ "fullname": "Name removed" }
Permission
This service requires administrator.
Response
The service returns a <member-delete>
element containing a single <member>
element corresponding to the member before it is deleted.
<member-delete> <member ...> ... </member> </member-delete>
Or in JSON:
{ "member": { ... } }
Error Handling
No specific errors expected for this service.