• 0 Posts
  • 10 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle




  • Don’t delete from the local_user table. You only need to delete from the person table, the rest of the tables will be updated automatically and user count will update automatically.

    Edit: The below command will delete all unverified users. NOTE: If you do not have email verification turned on then all users are unverified, therefore all users will be deleted. It also appears with v18 when you enable email verification all existing users remain unverified.

    This is a destructive command, use at your own risk and don’t go fucking with the database if you don’t have backups.

    DELETE FROM person WHERE local = 'true' AND id IN (SELECT person_id FROM local_user WHERE email_verified = 'false');

    In the parenthesis you can add your AND to only select unverified accounts of a certain age.