Merged r5939 from trunk.

handle a nil user in rake redmine📧test task.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@5942 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-28 03:34:23 +00:00
parent 9c355ee6c3
commit 7678aa9445
1 changed files with 1 additions and 1 deletions

View File

@ -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