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
b236802c
Commit
b236802c
authored
Apr 26, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 135814 - templatise Token.pm. Patch by zeroj; 2xr=bbaetz.
parent
fe882676
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
58 deletions
+62
-58
Token.pm
Bugzilla/Token.pm
+14
-29
Token.pm
Token.pm
+14
-29
forgotten-password.txt.tmpl
...e/en/default/account/password/forgotten-password.txt.tmpl
+34
-0
No files found.
Bugzilla/Token.pm
View file @
b236802c
...
...
@@ -114,7 +114,20 @@ sub IssuePasswordToken {
&::
SendSQL
(
"UNLOCK TABLES"
);
# Mail the user the token along with instructions for using it.
MailPasswordToken
(
$loginname
,
$token
);
my
$template
=
$::template
;
my
$vars
=
$::vars
;
$vars
->
{
'token'
}
=
$token
;
$vars
->
{
'emailaddress'
}
=
$loginname
.
&::
Param
(
'emailsuffix'
);
my
$message
=
""
;
$template
->
process
(
"account/email/password.txt.tmpl"
,
$vars
,
\
$message
)
||
&::
ThrowTemplateError
(
$template
->
error
());
open
SENDMAIL
,
"|/usr/lib/sendmail -t -i"
;
print
SENDMAIL
$message
;
close
SENDMAIL
;
}
...
...
@@ -153,34 +166,6 @@ sub GenerateUniqueToken {
}
sub
MailPasswordToken
{
# Emails a password token to a user along with instructions for its use.
# Called exclusively from &IssuePasswordToken.
my
(
$emailaddress
,
$token
)
=
@_
;
my
$urlbase
=
&::
Param
(
"urlbase"
);
my
$emailsuffix
=
&::
Param
(
'emailsuffix'
);
$token
=
&::
url_quote
(
$token
);
open
SENDMAIL
,
"|/usr/lib/sendmail -t -i"
;
print
SENDMAIL
qq|From: bugzilla-daemon
To: $emailaddress$emailsuffix
Subject: Bugzilla Change Password Request
You or someone impersonating you has requested to change your Bugzilla
password. To change your password, visit the following link:
${urlbase}token.cgi?a=cfmpw&t=$token
If you are not the person who made this request, or you wish to cancel
this request, visit the following link:
${urlbase}token.cgi?a=cxlpw&t=$token
|
;
close
SENDMAIL
;
}
sub
Cancel
{
# Cancels a previously issued token and notifies the system administrator.
...
...
Token.pm
View file @
b236802c
...
...
@@ -114,7 +114,20 @@ sub IssuePasswordToken {
&::
SendSQL
(
"UNLOCK TABLES"
);
# Mail the user the token along with instructions for using it.
MailPasswordToken
(
$loginname
,
$token
);
my
$template
=
$::template
;
my
$vars
=
$::vars
;
$vars
->
{
'token'
}
=
$token
;
$vars
->
{
'emailaddress'
}
=
$loginname
.
&::
Param
(
'emailsuffix'
);
my
$message
=
""
;
$template
->
process
(
"account/email/password.txt.tmpl"
,
$vars
,
\
$message
)
||
&::
ThrowTemplateError
(
$template
->
error
());
open
SENDMAIL
,
"|/usr/lib/sendmail -t -i"
;
print
SENDMAIL
$message
;
close
SENDMAIL
;
}
...
...
@@ -153,34 +166,6 @@ sub GenerateUniqueToken {
}
sub
MailPasswordToken
{
# Emails a password token to a user along with instructions for its use.
# Called exclusively from &IssuePasswordToken.
my
(
$emailaddress
,
$token
)
=
@_
;
my
$urlbase
=
&::
Param
(
"urlbase"
);
my
$emailsuffix
=
&::
Param
(
'emailsuffix'
);
$token
=
&::
url_quote
(
$token
);
open
SENDMAIL
,
"|/usr/lib/sendmail -t -i"
;
print
SENDMAIL
qq|From: bugzilla-daemon
To: $emailaddress$emailsuffix
Subject: Bugzilla Change Password Request
You or someone impersonating you has requested to change your Bugzilla
password. To change your password, visit the following link:
${urlbase}token.cgi?a=cfmpw&t=$token
If you are not the person who made this request, or you wish to cancel
this request, visit the following link:
${urlbase}token.cgi?a=cxlpw&t=$token
|
;
close
SENDMAIL
;
}
sub
Cancel
{
# Cancels a previously issued token and notifies the system administrator.
...
...
template/en/default/account/password/forgotten-password.txt.tmpl
0 → 100644
View file @
b236802c
[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): John Vandenberg <zeroj@null.net>
#%]
From: bugzilla-admin-daemon
To: [% emailaddress %]
Subject: Bugzilla Change Password Request
You (or someone impersonating you) has requested to change your Bugzilla
password. To change your password, visit the following link:
[%+ Param('urlbase') %]token.cgi?a=cfmpw&t=[% token FILTER url_quote %]
If you are not the person who made this request, or you wish to cancel
this request, visit the following link:
[%+ Param('urlbase') %]token.cgi?a=cxlpw&t=[% token FILTER url_quote %]
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