]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
M-x untabify Kai Krueger's ebcc988376b0dad8a0969803d52b1073420c77b7
[rails.git] / app / controllers / user_controller.rb
index 00dbcafb6ac44d5ba6211ca38c6467077fdd1d5f..77f63dfc619706256fdaa43d24bdee27a299b81d 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 
@@ -322,6 +322,10 @@ class UserController < ApplicationController
     @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