diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-05 11:50:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-05 11:50:53 +0000 |
commit | a00f04886fac78e489bb030d20414ebdf10841e3 (patch) | |
tree | 91d304c1be59bd251afb54143c288eebef2ed1e4 /lib/tasks | |
parent | 1d4ef8964def4ecbe7a11485f72d7fbe61c55724 (diff) | |
download | redmine-a00f04886fac78e489bb030d20414ebdf10841e3.tar.gz redmine-a00f04886fac78e489bb030d20414ebdf10841e3.zip |
Increase username length limit from 30 to 60 (#2719).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8778 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/migrate_from_trac.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index 26dec382b..ed45cad56 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -231,7 +231,7 @@ namespace :redmine do u = User.find_by_login(username) if !u # Create a new user if not found - mail = username[0,limit_for(User, 'mail')] + mail = username[0, User::MAIL_LENGTH_LIMIT] if mail_attr = TracSessionAttribute.find_by_sid_and_name(username, 'email') mail = mail_attr.value end @@ -249,7 +249,7 @@ namespace :redmine do :firstname => fn[0, limit_for(User, 'firstname')], :lastname => ln[0, limit_for(User, 'lastname')] - u.login = username[0,limit_for(User, 'login')].gsub(/[^a-z0-9_\-@\.]/i, '-') + u.login = username[0, User::LOGIN_LENGTH_LIMIT].gsub(/[^a-z0-9_\-@\.]/i, '-') u.password = 'trac' u.admin = true if TracPermission.find_by_username_and_action(username, 'admin') # finally, a default user is used if the new user is not valid |