Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add task in order to delete unconfirmed users (older than 2days) #1571

Merged
merged 2 commits into from
Apr 11, 2017
Merged

Add task in order to delete unconfirmed users (older than 2days) #1571

merged 2 commits into from
Apr 11, 2017

Conversation

d0p1s4m4
Copy link
Contributor

Related to #1565

just add a new rake task in order to delete unconfirmed users

namespace :users do
desc 'clear unconfirmed users'
task clear: :environment do
User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', 7.days.ago).find_each(&:destroy)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm maybe 24 hours or 2 days? Highly unlikely that someone would press "confirm" in an e-mail after waiting for so long.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, 2 days seems good.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, add a line on the first mail or on the web page : "You have two days for validate your account..."

@d0p1s4m4 d0p1s4m4 changed the title Add task in order to delete unconfirmed users (older than 7days) Add task in order to delete unconfirmed users (older than 2days) Apr 11, 2017
@Gargron Gargron merged commit 2f2b84b into mastodon:master Apr 11, 2017
@Fastidious
Copy link

Can you update the documentation on this one? Some administration document or similar, perhaps?

@symac
Copy link

symac commented Apr 11, 2017

Hello,
will there be any way for a remote service to know that a user account has been deleted ? On http://mastory.social/ I am regularly looking at user pages on their instances to update the information I have and if I get a 404, at the moment, I consider it might be a temporary issue with the server and try again later. If the user has been deleted I would be interested to know it and be able to remove it from my database.

From what I can see in the diff it is just deleting the user from DB, is there any plan to change/improve that ?

@Wonderfall
Copy link
Contributor

@Fastidious docker-compose run --rm mastodon-web rails mastodon:users:clear

@Gargron
Copy link
Member

Gargron commented Apr 11, 2017

@symac You shouldn't be able to discover unconfirmed users, since they can't login (therefore, can't post)

Suspended accounts return 410.

@valentin2105
Copy link
Contributor

Can you release v1.1.2 with this merge ?

Thanks a lot.

Nyoho referenced this pull request in Nyoho/mathtodon Apr 25, 2017
* add task in order to delete unconfirmed user

* change 7 days to 2
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.

8 participants