]> source.dussan.org Git - redmine.git/commitdiff
Merged r14966 (#21436).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 9 Jan 2016 09:12:45 +0000 (09:12 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 9 Jan 2016 09:12:45 +0000 (09:12 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15021 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/users_controller.rb
app/views/users/_general.html.erb

index 9ce80111a4c082c11cfb2d8a6ada821c1c75d849..33699325b5dcb250fbfe9dd7f2d67d3ce618358a 100644 (file)
@@ -143,7 +143,7 @@ class UsersController < ApplicationController
 
       if was_activated
         Mailer.account_activated(@user).deliver
-      elsif @user.active? && params[:send_information] && @user.password.present? && @user.auth_source_id.nil?
+      elsif @user.active? && params[:send_information] && @user.password.present? && @user.auth_source_id.nil? && @user != User.current
         Mailer.account_information(@user, @user.password).deliver
       end
 
index 0daa421c76563974462af1c0c14613622a610e39..7d84c0ced5fbc854b6b07b03b08358dea265e5ac 100644 (file)
@@ -1,6 +1,6 @@
 <%= labelled_form_for @user do |f| %>
   <%= render :partial => 'form', :locals => { :f => f } %>
-  <% if @user.active? && email_delivery_enabled? -%>
+  <% if @user.active? && email_delivery_enabled? && @user != User.current -%>
     <p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
   <% end -%>
   <p><%= submit_tag l(:button_save) %></p>