Database: Indication that a user is deleted

Hello there,

i hope, you are on the way to have a great weekend.
I am currently working on a report on all active users on out vaultwarden server.
The easiest way i have found so far is simply extracting the users from the database.
So what we did was simply copying the Database File from the docker container and querying that database then, getting user_email and enabled=1 FROM users.

What i have found out so far is, that even if we delete a user from Admin GUI, the user is still present in Database and also set to enabled=1.
This is a problem for the reports and sadly ( but not primarily ) also for german General Data Protection Regulation.

Do we overlook anything here ? Is there really no indication that a user is deleted in the database and does the delete funtion really not delete the users data such as email adress and name from the database ?

Hoping to get more insights on this.

Wish you all the best weekend.

Paul

If you delete a user from the admin interface, that user can’t exists in the database anymore.
It’s gone, delete. There is one exception, and that is when using SQLite, it might be that the data is still left in the wal/shm files and not yet fully written to the db file it self.

To make sure you have a valid copy, either close/restart Vaultwarden, which should trigger a write of the wal data. Or, use the backup feature, which will create a new file which should contain all the current data without disturbing the currently active database file.

Hello @BlackDex

thank you for your Post !
That resolved the problem.

Whis you a nice week
Paul