Merged r12164 from trunk (#14592).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12212 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-10-13 08:26:18 +00:00
parent c4eb7c380e
commit 8849727bd9
1 changed files with 2 additions and 2 deletions

View File

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