X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=update.cgi;h=3cf1900f1ac8e1cd01bac60dc08fc6077ee4cf61;hb=d3c278d5102a8583c68a544ebce7dd22dfabf4ac;hp=406d8134cd1600dd6c160c3af41ed5df9d6674aa;hpb=cee6f4d1f3276c419e1485bd840a3345307c9142;p=mirror%2Fuserdir-ldap-cgi.git
diff --git a/update.cgi b/update.cgi
index 406d813..3cf1900 100755
--- a/update.cgi
+++ b/update.cgi
@@ -40,7 +40,7 @@ if ($authtoken || $id) {
if ($proto eq "http" || !($id && $password)) {
print "Location: https://$ENV{SERVER_NAME}/$config{webloginhtml}\n\n";
exit;
-}
+}
my $ldap;
@@ -74,7 +74,7 @@ if (!$auth) {
$mesg = $ldap->search(base => $editdn,
filter => "uid=*");
$mesg->code && &Util::HTMLError($mesg->error);
-
+
my $entries = $mesg->as_struct;
if ($mesg->count != 1) {
# complain and quit
@@ -90,7 +90,7 @@ my $entry = $entries->{$dns[0]};
if (!($query->param('doupdate'))) {
# Not yet update, just fill in the form with the current values
my %data;
-
+
# Fill in %data
# First do the easy stuff - this catches most of the cases
foreach (keys(%$entry)) {
@@ -98,8 +98,6 @@ if (!($query->param('doupdate'))) {
$data{$_} = CGI::escapeHTML($data{$_}) if defined $data{$_};
}
- $data{gender} = 9 if not $data{gender};
-
# Now we have to fill in the rest that needs some processing...
$data{id} = $id;
$data{authtoken} = $authtoken;
@@ -130,18 +128,9 @@ if (!($query->param('doupdate'))) {
}
$data{mailcontentinspectionaction} ||= 'reject';
-
+
$data{email} = CGI::escapeHTML(join(", ", @{$entry->{emailforward}}));
- my $genderselect = '';
my $mailcontentselect = '