]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Fix deprecation warning.
[rails.git] / app / controllers / user_controller.rb
index f01157bc011fd3afa5ee9313faadef422172c7c0..9972ca3ee6c203dd0d6ea2ac0ca348aef82c611e 100644 (file)
@@ -116,6 +116,8 @@ class UserController < ApplicationController
           redirect_to :controller => 'site', :action => 'index'
         end
         return
+      elsif User.authenticate(email, pass, false)
+        flash[:notice] = "Sorry, your account is not active yet.<br>Please click on the link in the account confirmation email to activate your account."
       else
         flash[:notice] = "Sorry, couldn't log in with those details."
       end
@@ -163,7 +165,7 @@ class UserController < ApplicationController
       @user.save!
       render :nothing => true
     else
-      render :status => 400, :nothing => true
+      render :nothing => true, :status => :method_not_allowed
     end
   end
 
@@ -184,11 +186,6 @@ class UserController < ApplicationController
     @title = @this_user.display_name
   end
 
-  def diary
-    @this_user = User.find_by_display_name(params[:display_name])
-    @title = @this_user.display_name + "'s diary"
-  end
-
   def make_friend
 
     if params[:display_name]