]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
OpenID attributes returned via AX seem to be arrays now
[rails.git] / app / controllers / user_controller.rb
index bccd5d5cb499480ccf1055cbaa75075631159312..6ce14876338b103093f7848bf7cb92706d12ac0e 100644 (file)
@@ -534,8 +534,8 @@ private
           # to the create account page with username and email filled
           # in if they have been given by the OpenID provider through
           # the simple registration protocol.
-          nickname = sreg["nickname"] || ax["http://axschema.org/namePerson/friendly"]
-          email = sreg["email"] || ax["http://axschema.org/contact/email"]
+          nickname = sreg["nickname"] || ax["http://axschema.org/namePerson/friendly"].first
+          email = sreg["email"] || ax["http://axschema.org/contact/email"].first
           redirect_to :controller => 'user', :action => 'new', :nickname => nickname, :email => email, :openid => identity_url
         end
       elsif result.missing?