cgi-bin/ius-dav-htuseradd.cgi
branchfoerste2
changeset 57 2b8cf6a91d0b
parent 52 c892bf85383e
--- a/cgi-bin/ius-dav-htuseradd.cgi	Fri Jul 22 09:38:29 2011 +0200
+++ b/cgi-bin/ius-dav-htuseradd.cgi	Fri Sep 06 13:56:57 2013 +0200
@@ -23,7 +23,7 @@
 # restarting apache when everything else works
 # use CGI::Fast;
 use CGI;
-use Ius::Dav::Htpasswd qw(mkpasswd readconfig useradd);
+use Ius::Dav::Htpasswd;
 
 my $css = <<EOC;
 body {
@@ -68,7 +68,8 @@
 
 my $doit = 0;
 
-my $conf = readconfig or die "Can't readconfig";
+my $h = Ius::Dav::Htpasswd->new;
+$h->readconfig or die "Can't readconfig";
 
 if ( defined $p->{add} and $p->{add} ne '' ) {
 
@@ -79,7 +80,7 @@
 
     if ( my $pass = qx(@cmd) ) {
 
-        my $url = "$conf->{dav_base_remote}/$p->{user}";
+        my $url = $h->conf->{dav_base_remote} . "/$p->{user}";
 
         chomp $pass;