diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-15 08:32:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-15 08:32:06 +0000 |
commit | 9a3e4e0a519622cbfc4e793c1597e1eb80e0bb6d (patch) | |
tree | 44440912ba64517dd7aa6bc1e2769ead525d6008 /app/models | |
parent | 4e9fbeb8516581ddaf7a196f8dc0b710cbbce8aa (diff) | |
download | redmine-9a3e4e0a519622cbfc4e793c1597e1eb80e0bb6d.tar.gz redmine-9a3e4e0a519622cbfc4e793c1597e1eb80e0bb6d.zip |
Test broken by r11392 (#13174).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11395 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/mail_handler.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 1c619c6db..febee3d1c 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -426,8 +426,8 @@ class MailHandler < ActionMailer::Base assign_string_attribute_with_limit(user, 'login', email_address, User::LOGIN_LENGTH_LIMIT) names = fullname.blank? ? email_address.gsub(/@.*$/, '').split('.') : fullname.split - assign_string_attribute_with_limit(user, 'firstname', names.shift) - assign_string_attribute_with_limit(user, 'lastname', names.join(' ')) + assign_string_attribute_with_limit(user, 'firstname', names.shift, 30) + assign_string_attribute_with_limit(user, 'lastname', names.join(' '), 30) user.lastname = '-' if user.lastname.blank? password_length = [Setting.password_min_length.to_i, 10].max @@ -437,7 +437,7 @@ class MailHandler < ActionMailer::Base unless user.valid? user.login = "user#{Redmine::Utils.random_hex(6)}" unless user.errors[:login].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 user |