Commit b8904ce7 authored by Eric Davis's avatar Eric Davis

Handle a nil user when testin email.

  undefined method `logged?' for nil:NilClass
parent 5cbf1880
......@@ -172,7 +172,7 @@ END_DESC
abort l(:notice_email_error, "Please include the user login to test with. Example: login=examle-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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment