From 2fc9c8c05bfa4878d0a42d7b9238db67cee2805c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 13 Dec 2011 10:26:30 +0000 Subject: [PATCH] Cope with no openid_url being supplied --- app/controllers/user_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 3f5eef831..ce0122957 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -166,9 +166,10 @@ class UserController < ApplicationController @user.preferred_editor = params[:user][:preferred_editor] end - @user.openid_url = nil if params[:user][:openid_url].empty? + @user.openid_url = nil if params[:user][:openid_url].blank? - if params[:user][:openid_url].length > 0 and + if params[:user][:openid_url] and + params[:user][:openid_url].length > 0 and params[:user][:openid_url] != @user.openid_url # If the OpenID has changed, we want to check that it is a # valid OpenID and one the user has control over before saving -- 2.43.2