migrate_from_trac.rake does not properly parse First Name and Last Name (#14592).

Patch by Craig Rodrigues.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12164 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-09-25 17:49:58 +00:00
parent 5e2eedf2c5
commit 4a36e09d49
1 changed files with 2 additions and 2 deletions

View File

@ -249,8 +249,8 @@ namespace :redmine do
if name_attr = TracSessionAttribute.find_by_sid_and_name(username, 'name') if name_attr = TracSessionAttribute.find_by_sid_and_name(username, 'name')
name = name_attr.value name = name_attr.value
end end
name =~ (/(.*)(\s+\w+)?/) name =~ (/(\w+)(\s+\w+)?/)
fn = $1.strip fn = ($1 || "-").strip
ln = ($2 || '-').strip ln = ($2 || '-').strip
u = User.new :mail => mail.gsub(/[^-@a-z0-9\.]/i, '-'), u = User.new :mail => mail.gsub(/[^-@a-z0-9\.]/i, '-'),