this post was submitted on 25 Jun 2023
13 points (100.0% liked)

Lemmy Support

4650 readers
25 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

When the following is true:

  • User attempts to create an account
  • Instance has "require registration application" enabled
  • Instance's email is not working/unavailable

the application seems to get lost, the user never receives an email (even after email functionality is restored), nor can that email/username be used going forward to re-submit the account creation request.

Additionally, since the user never verifies their email, the instance admin never gets a registration application.

It's not currently an issue for me, however, would it be possible to delete these ghost users? If you lookup the profile/username in the database, you can view it via the web UI, but the only options appear to be either blocking the user or banning them. It might be good to be able to completely delete the accounts, no?

you are viewing a single comment's thread
view the rest of the comments
[–] NettoHikari@social.fossware.space 3 points 1 year ago (3 children)

I got a systemd timer going that executes an SQL query to remove those accounts every 24 hours. Works fine so far.

[–] jax@lemmy.cloudhub.social 3 points 1 year ago (2 children)

What's the sql query you are using? And which table do you remove them from? (Looks to me they show up in multiple tables)

Hey, sorry. Kinda overlooked your comment. This is the query I'm using:

DELETE FROM local_user WHERE email_verified = 'f' AND validator_time < NOW() - INTERVAL '$DELETE_INTERVAL';

  • $DELETE_INTERVAL is a variable in the bash script. You could use 1 days, for example
  • I'm not 100% sure if validator_time is the account creation date, but it seemed like it when I implemented this
  • If you wanted it to be cleaner, you'd also have to delete the record from the "people" table by comparing loal_user_id
[–] freeman@lemmy.pub 1 points 1 year ago

They def do. I second this @NettoHikari@social.fossware.space would love to see the SQL. I did a basic delete of a couple accounts today using the basic SQL

DELETE FROM local_user WHERE person_id=‘123456’

However I still see some of those users in in the server counts in the sidebar: