Project

General

Profile

Patch #5268 ยป openidfullnames.patch

Jeff Mitchell, 2010-04-07 22:28

View differences:

app/controllers/account_controller.rb
160 160
          # Create on the fly
161 161
          user.login = registration['nickname'] unless registration['nickname'].nil?
162 162
          user.mail = registration['email'] unless registration['email'].nil?
163
          user.firstname, user.lastname = registration['fullname'].split(' ') unless registration['fullname'].nil?
163
          # Handle names in the form of "Lastname, Firstname" as well as "Firstname Lastname"
164
          user.lastname, user.firstname = registration['fullname'].split(',') unless registration['fullname'].nil? or registration['fullname'].count(',') == 0
165
          user.firstname, user.lastname = registration['fullname'].split(' ') unless registration['fullname'].nil? or registration['fullname'].count(',') > 0
164 166
          user.random_password
165 167
          user.status = User::STATUS_REGISTERED
166 168

  
    (1-1/1)