]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Update Potlatch 2 to 2.3-11-gfd60020 build
[rails.git] / app / controllers / user_controller.rb
index d380e4c7bc211eb7b3ebd2e7f8f6323007f456d5..9c5ac0d09edf8bf400c196cb14b3ec3d54096082 100644 (file)
@@ -17,7 +17,7 @@ class UserController < ApplicationController
 
   filter_parameter_logging :password, :pass_crypt, :pass_crypt_confirmation
 
-  cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete], :unless => STATUS == :database_offline
+  cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete]
 
   def terms
     @legale = params[:legale] || OSM.IPToCountry(request.remote_ip) || DEFAULT_LEGALE
@@ -128,6 +128,7 @@ class UserController < ApplicationController
       @user.openid_url = nil if @user.openid_url and @user.openid_url.empty?
       
       if @user.save
+        flash[:piwik_goal] = PIWIK_SIGNUP_GOAL if defined?(PIWIK_SIGNUP_GOAL)
         flash[:notice] = t 'user.new.flash create success message', :email => @user.email
         Notifier.deliver_signup_confirm(@user, @user.tokens.create(:referer => session.delete(:referer)))
         session[:token] = @user.tokens.create.token
@@ -539,6 +540,10 @@ private
               failed_login t('user.login.auth failure')
           end
         else
+          # Guard against not getting any extension data
+          sreg = Hash.new if sreg.nil?
+          ax = Hash.new if ax.nil?
+
           # We don't have a user registered to this OpenID, so redirect
           # to the create account page with username and email filled
           # in if they have been given by the OpenID provider through