Introduction
Sometimes a user needs to be forcibly deleted, for example if their user data becomes corrupted and they need to be re-added to the instance.
Deleting a user through the analytics ID can be a more reliable method in cases of corrupted data or mismatched users.
This can be done through REPL commands on your server instance.
Prerequisites
You will need your user's analytics ID, which can be retrieved from MongoDB in your server.
The following commands will allow you to retrieve this:
$ kubectl get pods -owide | grep mongo
mongodb-0 1/1 Running 0 3d11h <IP_ADDRESS>
mongosh "mongodb:<IP_ADDRESS>/admin" ### Use the mongodb root password from the Helm values.yaml.
circle_ghe> db.users.find({ login: "<USERNAME>" })This will return data on the user, including the analytics ID.
Performing the Delete
Using the analytics ID retrieved in the previous step, run the following command in REPL:
user=> (circle.model.user/delete! (circle.model.user/find-one-by-analytics-id "<ANALYTICS-ID>"))
This will delete the user in your server instance, who can then be re-added if necessary.
Comments
Article is closed for comments.