Fixed some failing tests caused by the openID changes
authorKai Krueger <kakrueger@gmail.com>
Sat, 23 Jan 2010 14:23:35 +0000 (14:23 +0000)
committerKai Krueger <kakrueger@gmail.com>
Sat, 23 Jan 2010 14:23:35 +0000 (14:23 +0000)
app/controllers/user_controller.rb

index 7a4448e515337117aa951caae29059948a941b0a..3a4b009202b0138618a6ff879a3182078ec7c6b9 100644 (file)
@@ -46,7 +46,7 @@ class UserController < ApplicationController
                #to not get dupplicate conflicts for an empty openid 
                @user.openid_url = nil
 
-               if (params[:user][:openid_url].length > 0)
+               if (!params[:user][:openid_url].nil? and params[:user][:openid_url].length > 0)
                  if @user.pass_crypt.length == 0 
             #if the password is empty, but we have a openid 
             #then generate a random passowrd to disable 
@@ -282,7 +282,7 @@ class UserController < ApplicationController
     
     if params[:user] and session[:user].nil?
 
-      if !params[:user][:openid_url].empty?
+      if !params[:user][:openid_url].nil? and !params[:user][:openid_url].empty?
         open_id_authentication(params[:user][:openid_url])
       else
         email_or_display_name = params[:user][:email]