@user.openid_url = nil
if (!params[:user][:openid_url].nil? and params[:user][:openid_url].length > 0)
- if @user.pass_crypt.length == 0
+ if (@user.pass_crypt.nil? or @user.pass_crypt.length == 0)
#if the password is empty, but we have a openid
#then generate a random passowrd to disable
#loging in via password
@user.home_lat = params[:user][:home_lat]
@user.home_lon = params[:user][:home_lon]
+ @user.openid_url = nil if (params[:user][:openid_url].length == 0)
+
if @user.save
set_locale
@nickname = params['nickname']
@email = params['email']
@openID = params['openid']
+
+ if !params['openid'].nil?
+ flash.now[:notice] = t 'user.new.openID association'
+ end
end
def login