What are the different delete methods?
When you delete a user, you have a few different options:
- Keep User Content: Delete the user but keep the user's content.
- Blank User Content: Delete the user and replace all of the user's content with a message stating the user has been deleted. This gives a visual cue that there is missing information.
- Delete User Content: Delete the user and completely remove all of the user's content. This may cause discussions to be disjointed, but is the best option for removing SPAM.
Let's say that you want to delete the user, but keep the content (the first option):
A post that (pre-deletion) looked like this:
After the user is deleted (but content is kept) will look like this:
When you click on "Deleted User" or click on "@shaunatest" it would bring you to the same landing page:
If you choose the second option from the above (blank user content), a post that looked like this:
After hitting 'delete user' and hitting 'blank user content', the post looks like this:
Note that the title remains, though the body of the post and comment have been replaced with 'the user and all related content has been deleted' .
Please note as well, that System, who has not been deleted, quoted ShaunaTest, and the quote remains since the quote is attributed to System (not ShaunaTest).
The last option, Delete User Content, can be effective for really bad users or spammers, but can result in disjointed discussions, now that some comments are missing.
With this last and most drastic option, a post that looked like this:
Will now look like this:
And comments that were written by Shaunatest (deleted user) would just be gone altogether.
This is great for spam posts and wiping out users who never contributed anything useful, but can be problematic for users who posted good content.
Please note that this is also problematic if the user you are deleting authored discussions or questions with lots of comments or answers, as those comments/answers would be deleted as well as they would have no main discussion attached.
A way to side step this is to use the “Change Author” addon to change the author to a stub user prior to deletion.
Deleting Users using the API
As noted above, In the dashboard, when you delete a user you are given three options: keep, wipe (called blank in the dashboard) and delete.
These options also exist in APIv1 (sometimes called Simple API)
You can see this endpoint here:
This is not yet an endpoint in APIv2. The default for APIv2 is ‘delete’ and so you would not be able to keep or blank (wipe) the user's data with this endpoint.
Therefore, if you are looking to keep the user's content in anyway I recommend using APIv1:
Retrieve and delete a user using the 'keep' method: Delete the user but keep all the user's content. This will replace their username with Deleted User.
Retrieve and delete a user using the ‘wipe’ method: Delete the user and replace all of the user's content with a message stating the user has been deleted. This gives a visual cue that there is missing information.
This will result in their content being attributed to [deleted user] however we can change this verbiage if you prefer, just ask you CSM.
How do I access/extract a users data?
Here you have a few options depending on which data you need access to.
- Request a CSV export of user profile data from your CSM via email. This export will include the following for all users:
- Registration date
- Date of last login
- Last IP address
- # of discussions
- # of comments
- # of points
- And any custom profile fields you may have created in the Profile Fields settings
2. Access the JSON for user profiles, discussions and comments.
JSON is a language-independent data format. By appending a URL with .json, you can access a human-readable file of the accessible data on that page, and download it to your local device. User data is stored on the user profile, and each profile contains a link to the user’s posted discussions and comments.
N.B. Data access is governed by Roles & Permissions. You must be logged in as a trusted user with appropriate Role assignment in order to access PII information. The JSON file will only expose data you have access to view based on your Role.
To access the JSON for a user requesting access to their data:
- Sign in as an Administrator
- Visit the user’s profile e.g. https://success.vanillaforums.com/profile/system
- Append the URL with .json https://success.vanillaforums.com/profile/system.json
- Right-click on the page and select “Save as…” to download a copy of the data.
Make sure you share the data safely using a password protected file, or a trusted service like Google Drive or Dropbox. Make sure you delete the data from your local device once it’s been shared.
Similarly, if the user requests access to their posts, you can retrieve the JSON by appending their /profile/discussions, and /profile/comments pages with .json.
3. Retrieving Data via API
The following API calls can be used to get the users data, comments and discussions: