]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Add some strategic rel="nofollow" attributes to the data browser pages
[rails.git] / app / controllers / user_controller.rb
index 02cabb01073e215a51c2fb557bb77545bd3aea49..430e56cb05c1ae0719d5540874a6e681e721ab94 100644 (file)
@@ -67,7 +67,12 @@ class UserController < ApplicationController
           flash.now[:notice] = t 'user.account.flash update success'
         else
           flash.now[:notice] = t 'user.account.flash update success confirm needed'
-          Notifier.deliver_email_confirm(@user, @user.tokens.create)
+
+          begin
+            Notifier.deliver_email_confirm(@user, @user.tokens.create)
+          rescue
+            # Ignore errors sending email
+          end
         end
       end
     else
@@ -107,7 +112,8 @@ class UserController < ApplicationController
       if user
         token = user.tokens.create
         Notifier.deliver_lost_password(user, token)
-        flash.now[:notice] = t 'user.lost_password.notice email on way'
+        flash[:notice] = t 'user.lost_password.notice email on way'
+        redirect_to :action => 'login'
       else
         flash.now[:error] = t 'user.lost_password.notice email cannot find'
       end