logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: d439855a6d04ff04a187b4a1ded03c6ee2bc062e
parent: 2810013b933bceb2a7c1d1b8b10d2714c39d1e15
Author: Ash Furrow <ash@ashfurrow.com>
Date:   Mon, 10 Apr 2017 18:13:08 -0400

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


Diffstat:

Mlib/tasks/mastodon.rake11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake @@ -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