* Adds task to confirm user by email.
* Adds documentation for manual confirmation.
- Site extended description
You may wish to use the extended description (shown at https://yourmastodon.instance/about/more ) to display content guidelines or a user agreement (see https://mastodon.social/about/more for an example).
+
+## Confirming Users Manually
+
+The following rake task:
+
+ RAILS_ENV=production bundle exec rails mastodon:confirm_email USER_EMAIL=alice@alice.com
+
+Will confirm a user manually, in case they don't have access to their confirmation email for whatever reason.
puts "Congrats! #{user.account.username} is now an admin. \\o/\nNavigate to #{admin_settings_url} to get started"
end
+ desc 'Manually confirms a user with associated user email address stored in USER_EMAIL environment variable.'
+ task confirm_email: :environment do
+ email = ENV.fetch('USER_EMAIL')
+ user = User.where(email: email)
+ user.update(confirmed_at: Time.now.utc)
+
+ puts "User #{email} confirmed."
+ end
+
namespace :media do
desc 'Removes media attachments that have not been assigned to any status for longer than a day'
task clear: :environment do