mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 299572: Move MailPassword() from CGI.pl into BugMail.pm (and remove an unused variable) - Patch by Fr�d�ric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
This commit is contained in:
parent
47e87d82ac
commit
7c91495902
@ -658,4 +658,15 @@ sub PerformSubsts ($;$) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
# Send the login name and password of the newly created account to the user.
|
||||
sub MailPassword ($$) {
|
||||
my ($login, $password) = (@_);
|
||||
my $template = Param("passwordmail");
|
||||
my $msg = PerformSubsts($template,
|
||||
{"mailaddress" => $login . Param('emailsuffix'),
|
||||
"login" => $login,
|
||||
"password" => $password});
|
||||
MessageToMTA($msg);
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -186,18 +186,6 @@ sub CheckEmailSyntax {
|
||||
}
|
||||
}
|
||||
|
||||
sub MailPassword {
|
||||
my ($login, $password) = (@_);
|
||||
my $urlbase = Param("urlbase");
|
||||
my $template = Param("passwordmail");
|
||||
my $msg = PerformSubsts($template,
|
||||
{"mailaddress" => $login . Param('emailsuffix'),
|
||||
"login" => $login,
|
||||
"password" => $password});
|
||||
|
||||
Bugzilla::BugMail::MessageToMTA($msg);
|
||||
}
|
||||
|
||||
sub PutHeader {
|
||||
($vars->{'title'}, $vars->{'h1'}, $vars->{'h2'}) = (@_);
|
||||
|
||||
|
@ -32,6 +32,7 @@ require "CGI.pl";
|
||||
|
||||
use Bugzilla::Constants;
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::BugMail;
|
||||
|
||||
# Shut up misguided -w warnings about "used only once":
|
||||
use vars qw(
|
||||
@ -81,7 +82,7 @@ if (defined($login)) {
|
||||
|
||||
# Create account
|
||||
my $password = insert_new_user($login, $realname);
|
||||
MailPassword($login, $password);
|
||||
Bugzilla::BugMail::MailPassword($login, $password);
|
||||
|
||||
$template->process("account/created.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
Loading…
Reference in New Issue
Block a user