diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-08-29 20:07:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-08-29 20:07:28 +0000 |
commit | 39c9874a41028c7ec5f67207d698947c751d9484 (patch) | |
tree | b45e4b35f8bca53c89ba763dd005729c7497f7d8 /app/controllers/my_controller.rb | |
parent | 317b460d96523c234d2dc2343a9774888c74d44c (diff) | |
download | redmine-39c9874a41028c7ec5f67207d698947c751d9484.tar.gz redmine-39c9874a41028c7ec5f67207d698947c751d9484.zip |
Added the ability to reset its own RSS access key on "My account".
git-svn-id: http://redmine.rubyforge.org/svn/trunk@677 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r-- | app/controllers/my_controller.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 1c5a039ea..11aa7f1d0 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -52,10 +52,9 @@ class MyController < ApplicationController @pref = @user.pref @user.attributes = params[:user] @user.pref.attributes = params[:pref] - if request.post? and @user.save and @user.pref.save - set_localization - flash.now[:notice] = l(:notice_account_updated) - self.logged_in_user.reload + if request.post? && @user.save && @user.pref.save + flash[:notice] = l(:notice_account_updated) + redirect_to :action => 'account' end end @@ -76,6 +75,15 @@ class MyController < ApplicationController end redirect_to :action => 'account' end + + # Create a new feeds key + def reset_rss_key + if request.post? && User.current.rss_token + User.current.rss_token.destroy + flash[:notice] = l(:notice_feeds_access_key_reseted) + end + redirect_to :action => 'account' + end # User's page layout configuration def page_layout |