diff options
author | Hugo Seabrook <hugo.seabrook@gmail.com> | 2013-01-30 17:21:16 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2013-01-30 17:21:16 +0100 |
commit | d6d056f9755dea6b2c36779347be9fd03ff7eab0 (patch) | |
tree | 12445f22c689a5abfdcf285a1da6a5dc55dc7118 /editusers.cgi | |
parent | 3da30e2e7eea79ea8e5e0fbf4b048d02673356eb (diff) | |
download | bugzilla-d6d056f9755dea6b2c36779347be9fd03ff7eab0.tar.gz bugzilla-d6d056f9755dea6b2c36779347be9fd03ff7eab0.tar.xz |
Bug 272407: Send an e-mail when the administrator creates a new account for a user
r/a=LpSolit
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-x | editusers.cgi | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/editusers.cgi b/editusers.cgi index 66871e413..e12fc35b6 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -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'; |