Merged r5938 from trunk.
use rake task parameter style message if redmine📧test parameter is blank.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@5941 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
723030e40a
commit
9c355ee6c3
|
@ -169,7 +169,7 @@ END_DESC
|
||||||
desc "Send a test email to the user with the provided login name"
|
desc "Send a test email to the user with the provided login name"
|
||||||
task :test, :login, :needs => :environment do |task, args|
|
task :test, :login, :needs => :environment do |task, args|
|
||||||
include Redmine::I18n
|
include Redmine::I18n
|
||||||
abort l(:notice_email_error, "Please include the user login to test with. Example: login=examle-login") if args[:login].blank?
|
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])
|
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.logged?
|
||||||
|
|
Loading…
Reference in New Issue