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
abort l(:notice_email_error, "Please include the user login to test with. Example: rake redmine:email:test[login]") if args[:login].blank?\r
\r
user = User.find_by_login(args[:login])\r
- abort l(:notice_email_error, "User #{args[:login]} not found") unless user.logged?\r
+ abort l(:notice_email_error, "User #{args[:login]} not found") unless user && user.logged?\r
\r
ActionMailer::Base.raise_delivery_errors = true\r
begin\r