From 9faf30fb45234c84c1e9829c1842fa259cc61207 Mon Sep 17 00:00:00 2001 From: Kai Krueger Date: Sun, 2 May 2010 11:03:45 +0100 Subject: [PATCH] Add an extra null pointer check that can trigger in tests --- app/controllers/user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index cc12cc9e7..f02cd6dc1 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -49,7 +49,7 @@ class UserController < ApplicationController @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 -- 2.43.2