Project

General

Profile

Patch #5268 ยป openidfullnames.patch

Jeff Mitchell, 2010-04-07 22:28

View differences:

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