Test broken by r11392 (#13174).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11395 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-02-15 08:32:06 +00:00
parent 4e9fbeb851
commit 9a3e4e0a51
1 changed files with 3 additions and 3 deletions

View File

@ -426,8 +426,8 @@ class MailHandler < ActionMailer::Base
assign_string_attribute_with_limit(user, 'login', email_address, User::LOGIN_LENGTH_LIMIT) assign_string_attribute_with_limit(user, 'login', email_address, User::LOGIN_LENGTH_LIMIT)
names = fullname.blank? ? email_address.gsub(/@.*$/, '').split('.') : fullname.split names = fullname.blank? ? email_address.gsub(/@.*$/, '').split('.') : fullname.split
assign_string_attribute_with_limit(user, 'firstname', names.shift) assign_string_attribute_with_limit(user, 'firstname', names.shift, 30)
assign_string_attribute_with_limit(user, 'lastname', names.join(' ')) assign_string_attribute_with_limit(user, 'lastname', names.join(' '), 30)
user.lastname = '-' if user.lastname.blank? user.lastname = '-' if user.lastname.blank?
password_length = [Setting.password_min_length.to_i, 10].max password_length = [Setting.password_min_length.to_i, 10].max
@ -437,7 +437,7 @@ class MailHandler < ActionMailer::Base
unless user.valid? unless user.valid?
user.login = "user#{Redmine::Utils.random_hex(6)}" unless user.errors[:login].blank? user.login = "user#{Redmine::Utils.random_hex(6)}" unless user.errors[:login].blank?
user.firstname = "-" unless user.errors[:firstname].blank? user.firstname = "-" unless user.errors[:firstname].blank?
user.lastname = "-" unless user.errors[:lastname].blank? (puts user.errors[:lastname];user.lastname = "-") unless user.errors[:lastname].blank?
end end
user user