From: Jean-Philippe Lang Date: Sun, 3 Dec 2006 20:51:17 +0000 (+0000) Subject: "hide my email address" preference added, so that it's not displayed on account/show X-Git-Tag: 0.4.0~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=948e2190f877fcc7ab93e8b4ab5b80da53a57911;p=redmine.git "hide my email address" preference added, so that it's not displayed on account/show git-svn-id: http://redmine.rubyforge.org/svn/trunk@63 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/redmine/app/controllers/my_controller.rb b/redmine/app/controllers/my_controller.rb index 25f362df2..ff12b74d7 100644 --- a/redmine/app/controllers/my_controller.rb +++ b/redmine/app/controllers/my_controller.rb @@ -44,7 +44,10 @@ class MyController < ApplicationController # Edit user's account def account @user = self.logged_in_user - if request.post? and @user.update_attributes(@params[:user]) + @pref = @user.pref + @user.attributes = params[:user] + @user.pref.attributes = params[:pref] + if request.post? and @user.save set_localization flash.now[:notice] = l(:notice_account_updated) self.logged_in_user.reload diff --git a/redmine/app/views/account/show.rhtml b/redmine/app/views/account/show.rhtml index 4fa306764..985238951 100644 --- a/redmine/app/views/account/show.rhtml +++ b/redmine/app/views/account/show.rhtml @@ -1,7 +1,7 @@

<%= @user.display_name %>

-<%= mail_to @user.mail %> +<%= mail_to @user.mail unless @user.pref.hide_mail %>