##// END OF EJS Templates
Test broken by r11392 (#13174)....
Jean-Philippe Lang -
r11165:9a3e4e0a5196
parent child
Show More
@@ -426,8 +426,8 class MailHandler < ActionMailer::Base
426 assign_string_attribute_with_limit(user, 'login', email_address, User::LOGIN_LENGTH_LIMIT)
426 assign_string_attribute_with_limit(user, 'login', email_address, User::LOGIN_LENGTH_LIMIT)
427
427
428 names = fullname.blank? ? email_address.gsub(/@.*$/, '').split('.') : fullname.split
428 names = fullname.blank? ? email_address.gsub(/@.*$/, '').split('.') : fullname.split
429 assign_string_attribute_with_limit(user, 'firstname', names.shift)
429 assign_string_attribute_with_limit(user, 'firstname', names.shift, 30)
430 assign_string_attribute_with_limit(user, 'lastname', names.join(' '))
430 assign_string_attribute_with_limit(user, 'lastname', names.join(' '), 30)
431 user.lastname = '-' if user.lastname.blank?
431 user.lastname = '-' if user.lastname.blank?
432
432
433 password_length = [Setting.password_min_length.to_i, 10].max
433 password_length = [Setting.password_min_length.to_i, 10].max
@@ -437,7 +437,7 class MailHandler < ActionMailer::Base
437 unless user.valid?
437 unless user.valid?
438 user.login = "user#{Redmine::Utils.random_hex(6)}" unless user.errors[:login].blank?
438 user.login = "user#{Redmine::Utils.random_hex(6)}" unless user.errors[:login].blank?
439 user.firstname = "-" unless user.errors[:firstname].blank?
439 user.firstname = "-" unless user.errors[:firstname].blank?
440 user.lastname = "-" unless user.errors[:lastname].blank?
440 (puts user.errors[:lastname];user.lastname = "-") unless user.errors[:lastname].blank?
441 end
441 end
442
442
443 user
443 user
General Comments 0
You need to be logged in to leave comments. Login now