ispman/lib/ISPMan UserMan.pm,1.59,1.60

Joerg Delker <[email protected]> Wed, 25 Oct 2006 20:49:22 +0000
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23166/lib/ISPMan

Modified Files:
	UserMan.pm 
Log Message:
fixing problems with mail uniqueness check

Index: UserMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/UserMan.pm,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- UserMan.pm	24 Oct 2006 21:32:19 -0000	1.59
+++ UserMan.pm	25 Oct 2006 20:49:20 -0000	1.60
@@ -138,7 +138,8 @@
     $r->param( "uid", $_uid );
 
     # check uid conflicts with existing mail addresses
-    if ( my $check = $self->getDNForMailAddress($_uid) ) {
+    if ( my $check = $self->getDNForMailAddress(
+       join '@', ($r->param("userid"), $r->param("ispmanDomain"))) ) {
         print "Unable to create user \"$_uid\", because mail address is<br>"
           . "already blocked by \"$check\".";
         return;
@@ -208,7 +209,7 @@
         my $entries =
           $self->getEntriesAsHashRef( $self->{'Config'}->{'ldapBaseDN'},
             "|(mailLocalAddress=$mail)(mailAlias=$mail)" );
-        my ($found) = keys %$entries;
+        ($found) = keys %$entries;
     }
     return $found;
 }
@@ -363,7 +364,8 @@
     if ( my $check =
         $self->getDNForMailAddress( split( /\s+/, $r->param("mailAlias") ) ) )
     {
-        print "Mail aliases conflict with \"$check\".";
+        print "Mail aliases conflict with \"$check\".<br>";
+        print "Aborting update!";
         return 0;
     }
 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642