Skip to content

Conversation

@doobeh
Copy link
Contributor

@doobeh doobeh commented May 27, 2025

I've assumed a stale user is one whose database entry hasn't been updated in 24hrs, who doesn't have payment or email confirmation data on the record. That 24hour variable could be pulled out to the .env if needed.

The idea is you can run docker compose run --rm artisan users:delete-stale manually or docker compose run --rm artisan users:delete-stale --force on a cron/scheduled job on the server/within Laravel, every hour or so.

It will check the database and do a hard delete of any of those users (not just setting their deleted_at field). I'm not checking for other data, posts, comments etc-- as the database will deny the deletion because of the referential data.

While I was in there, I also just tweaked the user profile page, so now it's reading the joined date from the database, not just a static value.

fixes #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not reserve usernames indefinitely

1 participant