summaryrefslogtreecommitdiffstats
path: root/changepassword.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-08-19 09:06:00 +0200
committerterry%mozilla.org <>1999-08-19 09:06:00 +0200
commit1d971ce0a409d7d324c742cd54a0d67ca7132d55 (patch)
treece18375e5fd0a6d5ff3b7c187b36fc4f8dc80003 /changepassword.cgi
parent63dd4a061b87dcd1ccad7b8bc6b23721e09f2fef (diff)
downloadbugzilla-1d971ce0a409d7d324c742cd54a0d67ca7132d55.tar.gz
bugzilla-1d971ce0a409d7d324c742cd54a0d67ca7132d55.tar.xz
Patch by Chris Baldwin <chris.baldwin@siara.com> -- allow optional
entry of the user's realname. Note that nothing actually makes use of this info at present.
Diffstat (limited to 'changepassword.cgi')
-rwxr-xr-xchangepassword.cgi20
1 files changed, 17 insertions, 3 deletions
diff --git a/changepassword.cgi b/changepassword.cgi
index da9429b8a..66dff014b 100755
--- a/changepassword.cgi
+++ b/changepassword.cgi
@@ -33,9 +33,11 @@ if (! defined $::FORM{'pwd1'}) {
if (Param('useqacontact')) {
$qacontactpart = ", the current QA Contact";
}
- SendSQL("select emailnotification from profiles where login_name = " .
- SqlQuote($::COOKIE{'Bugzilla_login'}));
- my ($emailnotification) = (FetchSQLData());
+ my $loginname = SqlQuote($::COOKIE{'Bugzilla_login'});
+ SendSQL("select emailnotification,realname from profiles where login_name = " .
+ $loginname);
+ my ($emailnotification, $realname) = (FetchSQLData());
+ $realname = value_quote($realname);
print qq{
<form method=post>
<hr>
@@ -47,6 +49,11 @@ if (! defined $::FORM{'pwd1'}) {
<tr>
<td align=right>Re-enter your new password:</td>
<td><input type=password name="pwd2"></td>
+</tr>
+<tr>
+<td align=right>Your real name (optional):</td>
+<td><input size=35 name=realname value="$realname"></td>
+</tr>
</table>
<hr>
<table>
@@ -122,6 +129,13 @@ Please click <b>Back</b> and try again.\n";
SendSQL("update profiles set emailnotification='$::FORM{'emailnotification'}' where login_name = " .
SqlQuote($::COOKIE{'Bugzilla_login'}));
+my $newrealname = $::FORM{'realname'};
+
+if ($newrealname ne "") {
+ $newrealname = SqlQuote($newrealname);
+ SendSQL("update profiles set realname=$newrealname where login_name = " .
+ SqlQuote($::COOKIE{'Bugzilla_login'}));
+}
PutHeader("Preferences updated.");
print "