Change import of Net::LDAP to work on squeeze
[mirror/userdir-ldap-cgi.git] / update.cgi
index c4ad736..c42eddc 100755 (executable)
@@ -13,7 +13,7 @@ use Digest::HMAC_SHA1 qw(hmac_sha1_hex);
 use Util;
 use English;
 use URI::Escape;
-use Net::LDAP qw(:all);
+use Net::LDAP qw(LDAP_SUCCESS LDAP_PROTOCOL_ERROR);
 
 my %config = &Util::ReadConfigFile;
 
@@ -108,6 +108,8 @@ if (!($query->param('doupdate'))) {
     $data{mailcallout} = "";
   }
 
+  $data{maildefaultoptions} ||= 'TRUE';
+
   if ($data{maildefaultoptions} eq "TRUE") {
     $data{maildefaultoptions} = " checked";
   } else {