@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
@user.custom_values = @custom_values
if @user.save
+ Mailer.deliver_account_information(@user, params[:password]) if params[:send_information]
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list'
end
class Mailer < ActionMailer::Base
helper IssuesHelper
+
+ def account_information(user, password)
+ set_language_if_valid user.language
+ recipients user.mail
+ from Setting.mail_from
+ subject l(:mail_subject_register)
+ body :user => user, :password => password
+ end
def issue_add(issue)
set_language_if_valid(Setting.default_language)
--- /dev/null
+<% if @user.auth_source %>You can use your "<%= @user.auth_source.name %>" account to log into Redmine.
+<% else %>Your Redmine account information:
+* Login: <%= @user.login %>
+* Password: <%= @password %>
+<% end %>
+Log in: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'login' %>
+<% unless @user.auth_source %>
+You can change your password here: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'my', :action => 'account' %>
+<% end %>
--- /dev/null
+<% if @user.auth_source %>Vous pouvez utiliser votre compte "<%= @user.auth_source.name %>" pour vous connecter à Redmine.
+<% else %>Paramètres de connexion de votre compte Redmine:
+* Identifiant: <%= @user.login %>
+* Mot de passe: <%= @password %>
+<% end %>
+Pour se connecter à l'application: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'login' %>
+<% unless @user.auth_source %>
+Vous pouvez changer votre mot de passe à l'adresse: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'my', :action => 'account' %>
+<% end %>
<% labelled_tabular_form_for :user, @user, :url => { :action => "add" } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
-<% end %>
\ No newline at end of file
+<%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %>
+<% end %>
\r
# Disable delivery errors if you bad email addresses should just be ignored
config.action_mailer.raise_delivery_errors = false
-\r
+
+# No email in production log
+config.action_mailer.logger = nil\r
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: Вход
button_submit: Изпращане
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: Einloggen
button_submit: OK
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: Login
button_submit: Submit
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: Conexión
button_submit: Someter
label_message_last: Dernier message
label_message_new: Nouveau message
label_reply_plural: Réponses
+label_send_information: Envoyer les informations à l'utilisateur
button_login: Connexion
button_submit: Soumettre
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: Login
button_submit: Invia
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: ログイン
button_submit: 変更
label_message_last: Laatste bericht
label_message_new: Nieuw bericht
label_reply_plural: Antwoorden
+label_send_information: Send account information to the user
button_login: Inloggen
button_submit: Toevoegen
label_message_last: Last message\r
label_message_new: New message\r
label_reply_plural: Replies\r
+label_send_information: Send account information to the user\r
\r
button_login: Login\r
button_submit: Enviar\r
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: Login
button_submit: Enviar
label_message_last: Last message
label_message_new: New message
label_reply_plural: Replies
+label_send_information: Send account information to the user
button_login: 登录
button_submit: 提交