Browse Source

Adds error message to mastodon:confirm_email task. (#1476)

closed-social-glitch-2
Ash Furrow 7 years ago
committed by wxcafé
parent
commit
d439855a6d
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      lib/tasks/mastodon.rake

+ 7
- 4
lib/tasks/mastodon.rake View File

@ -13,10 +13,13 @@ namespace :mastodon do
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."
user = User.where(email: email).first
if user
user.update(confirmed_at: Time.now.utc)
puts "User #{email} confirmed."
else
abort "User #{email} not found."
end
end
namespace :media do

Loading…
Cancel
Save