Cope with no openid_url being supplied

This commit is contained in:
Tom Hughes 2011-12-13 10:26:30 +00:00
parent 49038a44d9
commit 2fc9c8c05b

View file

@ -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