]> git.openstreetmap.org Git - rails.git/commitdiff
Add an extra null pointer check that can trigger in tests
authorKai Krueger <kakrueger@gmail.com>
Sun, 2 May 2010 10:03:45 +0000 (11:03 +0100)
committerKai Krueger <kakrueger@gmail.com>
Sun, 2 May 2010 10:03:45 +0000 (11:03 +0100)
app/controllers/user_controller.rb

index cc12cc9e74ca2f3d69540cd39911b014cb3533ca..f02cd6dc1da5804a143bba654931901d22b30d8c 100644 (file)
@@ -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