From: Toshi MARUYAMA Date: Sat, 28 May 2011 03:34:23 +0000 (+0000) Subject: Merged r5939 from trunk. X-Git-Tag: 1.2.0~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7678aa9445f23ef4cfedb39cb81819d835fb32aa;p=redmine.git Merged r5939 from trunk. handle a nil user in rake redmine:email:test task. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@5942 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/tasks/email.rake b/lib/tasks/email.rake index 5bd59f0f8..81121f839 100644 --- a/lib/tasks/email.rake +++ b/lib/tasks/email.rake @@ -172,7 +172,7 @@ END_DESC abort l(:notice_email_error, "Please include the user login to test with. Example: rake redmine:email:test[login]") if args[:login].blank? user = User.find_by_login(args[:login]) - abort l(:notice_email_error, "User #{args[:login]} not found") unless user.logged? + abort l(:notice_email_error, "User #{args[:login]} not found") unless user && user.logged? ActionMailer::Base.raise_delivery_errors = true begin