Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
d6d056f9
Commit
d6d056f9
authored
Jan 30, 2013
by
Hugo Seabrook
Committed by
Frédéric Buclin
Jan 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 272407: Send an e-mail when the administrator creates a new account for a user
r/a=LpSolit
parent
3da30e2e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
editusers.cgi
editusers.cgi
+10
-0
userdata.html.tmpl
template/en/default/admin/users/userdata.html.tmpl
+9
-0
new-user-details.txt.tmpl
template/en/default/email/new-user-details.txt.tmpl
+31
-0
No files found.
editusers.cgi
View file @
d6d056f9
...
...
@@ -21,6 +21,7 @@ use Bugzilla::Flag;
use
Bugzilla::
Field
;
use
Bugzilla::
Group
;
use
Bugzilla::
Token
;
use
Bugzilla::
Mailer
;
my
$user
=
Bugzilla
->
login
(
LOGIN_REQUIRED
);
...
...
@@ -218,6 +219,15 @@ if ($action eq 'search') {
delete_token
(
$token
);
if
(
$cgi
->
param
(
'notify_user'
))
{
$vars
->
{
'new_user'
}
=
$new_user
;
my
$message
;
$template
->
process
(
'email/new-user-details.txt.tmpl'
,
$vars
,
\
$message
)
||
ThrowTemplateError
(
$template
->
error
());
MessageToMTA
(
$message
);
}
# We already display the updated page. We have to recreate a token now.
$vars
->
{
'token'
}
=
issue_session_token
(
'edit_user'
);
$vars
->
{
'message'
}
=
'account_created'
;
...
...
template/en/default/admin/users/userdata.html.tmpl
View file @
d6d056f9
...
...
@@ -107,3 +107,12 @@
</td>
</tr>
[% END %]
[% UNLESS editform %]
<tr>
<th><label for="notify_user">Notify User:</label></th>
<td>
<input type="checkbox" name="notify_user" id="notify_user" value="1">
(Email this user their account information. The password will not be included.)
</td>
</tr>
[% END %]
template/en/default/email/new-user-details.txt.tmpl
0 → 100644
View file @
d6d056f9
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[%# INTERFACE:
# new_user: The Bugzilla::User object of the user being created
#%]
From: [% Param('mailfrom') %]
To: [% new_user.email %]
Subject: [% terms.Bugzilla %]: New account created
X-Bugzilla-Type: admin
[This e-mail has been automatically generated]
A new [% terms.Bugzilla %] user account has been created at [% urlbase %]:
Login: [% new_user.login %]
[% IF new_user.realname %]
Real name: [% new_user.realname %]
[% END %]
For security reasons, we have not included your new password in this e-mail.
If you have not being given it via other means, you can use the 'Forgot
Password' link to set a new password.
If you have any issues regarding your account, please contact [% Param('maintainer') %].
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment