From d38e476fa66a69285639ca4d6f94f7aa676e1d88 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 27 Jul 2012 21:27:45 +0100 Subject: [PATCH] OpenID attributes returned via AX seem to be arrays now --- app/controllers/user_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index bccd5d5cb..6ce148763 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -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? -- 2.43.2