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

Auto-remove unconfirmed users #1565

Closed
angristan opened this issue Apr 11, 2017 · 7 comments
Closed

Auto-remove unconfirmed users #1565

angristan opened this issue Apr 11, 2017 · 7 comments

Comments

@angristan
Copy link
Contributor

I have a lot of users that just register with some random username and email, don't confirm the account and never come back.

screenshot_11-04-2017_b hwqfvrkf

screenshot_11-04-2017_b wimylqg8

It's faking the user stats, taking useless space in the DB and taking usernames that may have been used by others.

It would be great to have an option to delete the users manually, or having a cron that delete them after a certain delay, 7 days for example. I believe it does not cause any problem for the federation.

@expenses
Copy link

You should be able to use cron to do the rake task now.

@Fritillaria
Copy link

Hello, I was able to register for an account, and have never been able to get a confirmation email sent to me despite trying about 50 times. If there is going to be autodelete, there should be some attention to why the process is not being finished in the first place. How many of these users gave up trying to get confirmation? Why allow a user to open an account if I can't confirm it? I'm a user, that's all, but I'm frustrated.

@Aldarone
Copy link
Contributor

I'm on 8a58942 and when I tried the rake task I'm getting this exception :

rails aborted!
NoMethodError: undefined method `delete_all' for #<Array:0x00564340b47998>
/mastodon/lib/tasks/mastodon.rake:85:in `block (4 levels) in <top (required)>'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/relation/batches.rb:121:in `block in find_in_batches'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/relation/batches.rb:214:in `block in in_batches'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/relation/batches.rb:198:in `loop'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/relation/batches.rb:198:in `in_batches'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/relation/batches.rb:120:in `find_in_batches'
/mastodon/lib/tasks/mastodon.rake:83:in `block (3 levels) in <top (required)>'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => mastodon:users:clear
(See full trace by running task with --trace)

@Wonderfall
Copy link
Contributor

I experience the same issue as @Aldarone.

Gargron added a commit that referenced this issue Apr 16, 2017
Gargron added a commit that referenced this issue Apr 16, 2017
@Wonderfall
Copy link
Contributor

I confirm it's now fixed. Thanks for your work, @Gargron.

@angristan
Copy link
Contributor Author

Can we close this ? 🤔

Nyoho referenced this issue in Nyoho/mathtodon Apr 25, 2017
@ashfurrow
Copy link
Contributor

Yup, good idea @angristan. Going to close.

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

No branches or pull requests

7 participants