Report duplicate OpenID URLs cleanly
authorTom Hughes <tom@compton.nu>
Tue, 11 May 2010 20:33:32 +0000 (21:33 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 11 May 2010 21:08:52 +0000 (22:08 +0100)
app/controllers/user_controller.rb
app/views/user/new.html.erb

index 0459d9a534eb6a581600364ee49e2c6a363eea5a..726fb1cd7b81d075e160e145e14ea0b9fa969482 100644 (file)
@@ -45,7 +45,6 @@ class UserController < ApplicationController
       session[:referer] = params[:referer]
 
       @user = User.new(params[:user])
-      @user.openid_url = nil
 
       if params[:user][:openid_url] and @user.pass_crypt.empty?
         # We are creating an account with OpenID and no password
index 83a4d39e4e8d659b2d604bd4c5bd39f6e6626ad5..4e3f4428d6f11194c339f31fa1d115ee1ddf4b23 100644 (file)
@@ -75,7 +75,7 @@
 
 <%=
   update_page_tag do |page|
-    if params[:openid] 
+    if params[:openid] or (@user and @user.openid_url)
       page[:openid_prompt].hide
     else
       page[:openid_spacer].hide