Skip to content

Instantly share code, notes, and snippets.

@pichot
Created January 21, 2015 17:46
Show Gist options
  • Save pichot/b2ea3f4440a7be9058e2 to your computer and use it in GitHub Desktop.
Save pichot/b2ea3f4440a7be9058e2 to your computer and use it in GitHub Desktop.
Discourse Send Reset to All Users
User.all.each do |user|
email_token = user.email_tokens.create(email: user.email)
Jobs.enqueue(:user_email, type: :forgot_password, user_id: user.id, email_token: email_token.token)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment