summaryrefslogtreecommitdiff
path: root/www/admin
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2007-05-24 09:31:05 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2007-05-24 09:31:05 (GMT)
commitc95a456fb40ba6285d3360cf27b44b1212ebd145 (patch)
tree6949b1f0250cd8ca9991f38d8ad5e48f7ee86e64 /www/admin
parentea3165d107b57d91af3fe75e8a48c307e9260207 (diff)
downloadkolab-webadmin-c95a456fb40ba6285d3360cf27b44b1212ebd145.tar.gz
Fixed kolab/issue1742 (https://intevation.de/roundup/kolab/issue1742)
Diffstat (limited to 'www/admin')
-rw-r--r--www/admin/addressbook/addr.php.in4
-rw-r--r--www/admin/administrator/admin.php.in2
-rw-r--r--www/admin/domainmaintainer/domainmaintainer.php.in2
-rw-r--r--www/admin/maintainer/maintainer.php.in2
-rw-r--r--www/admin/user/user.php.in11
5 files changed, 8 insertions, 13 deletions
diff --git a/www/admin/addressbook/addr.php.in b/www/admin/addressbook/addr.php.in
index 3b42c09..5cd56cd 100644
--- a/www/admin/addressbook/addr.php.in
+++ b/www/admin/addressbook/addr.php.in
@@ -85,7 +85,7 @@ function checkuniquealias( $form, $key, $value ) {
foreach( $lst as $alias ) {
debug( "looking at $alias, exluding $dn" );
if( $ldap->countMail( $_SESSION['base_dn'], $alias, $excludedn ) > 0 ) {
- $str .= _('Email address ').MySmarty::htmlentities($alias)._(' collision <br />');
+ $str .= _('Email address ').MySmarty::htmlentities($alias)._(' collides with an address already used for another user, a vCard or a distribution list.<br />');
}
}
return $str;
@@ -153,6 +153,7 @@ if( !$errors ) {
$content = $form->outputForm();
break;
case 'firstsave':
+ $ldap_object = array('objectClass' => array( 'top', 'inetOrgPerson', 'kolabInetOrgPerson' ) );
case 'save':
if( $form->isSubmitted() ) {
if( !$form->validate() ) {
@@ -160,7 +161,6 @@ if( !$errors ) {
$content = $form->outputForm();
} else {
$addressbook_root = "cn=external,".$_SESSION['base_dn'];
- $ldap_object = array('objectClass' => array( 'top', 'inetOrgPerson', 'kolabInetOrgPerson' ) );
$firstname = trim($_POST['firstname']);
$lastname = trim($_POST['lastname']);
$ldap_object['sn'] = trim($lastname);
diff --git a/www/admin/administrator/admin.php.in b/www/admin/administrator/admin.php.in
index e8d5103..332540d 100644
--- a/www/admin/administrator/admin.php.in
+++ b/www/admin/administrator/admin.php.in
@@ -175,6 +175,7 @@ $form =& new KolabForm( 'admin', 'createadmin.tpl', $entries );
switch( $action ) {
case 'firstsave':
debug("adding checkuniquemail to validation");
+ $ldap_object['objectClass'] = array('top','inetOrgPerson', 'kolabInetOrgPerson');
$form->entries['uid']['validation'] = 'checkuniquemail';
case 'save':
if( $form->isSubmitted() ) {
@@ -184,7 +185,6 @@ switch( $action ) {
} else {
debug("Process...");
$ldap_object = array();
- $ldap_object['objectClass'] = array('top','inetOrgPerson', 'kolabInetOrgPerson');
$ldap_object['sn'] = trim($_POST['lastname']);
$ldap_object['cn'] = trim($_POST['firstname']).' '.$ldap_object['sn'];
if( !empty( $_POST['password_0'] ) ) {
diff --git a/www/admin/domainmaintainer/domainmaintainer.php.in b/www/admin/domainmaintainer/domainmaintainer.php.in
index f6ba885..ff89675 100644
--- a/www/admin/domainmaintainer/domainmaintainer.php.in
+++ b/www/admin/domainmaintainer/domainmaintainer.php.in
@@ -158,6 +158,7 @@ $form =& new KolabForm( 'maintainer', 'createmaintainer.tpl', $entries );
switch( $action ) {
case 'firstsave':
debug("adding checkuniquemail to validation");
+ $ldap_object['objectClass'] = array( 'top', 'inetOrgPerson', 'kolabInetOrgPerson');
$form->entries['uid']['validation'] = 'checkuniquemail';
case 'save':
if( $form->isSubmitted() ) {
@@ -166,7 +167,6 @@ switch( $action ) {
$content = $form->outputForm();
} else {
$ldap_object = array();
- $ldap_object['objectClass'] = array( 'top', 'inetOrgPerson', 'kolabInetOrgPerson');
$ldap_object['sn'] = trim($_POST['lastname']);
$ldap_object['cn'] = trim($_POST['firstname']).' '.$ldap_object['sn'];
if( !empty( $_POST['password_0'] ) ) {
diff --git a/www/admin/maintainer/maintainer.php.in b/www/admin/maintainer/maintainer.php.in
index 5786e3e..72037c6 100644
--- a/www/admin/maintainer/maintainer.php.in
+++ b/www/admin/maintainer/maintainer.php.in
@@ -172,6 +172,7 @@ $form =& new KolabForm( 'maintainer', 'createmaintainer.tpl', $entries );
switch( $action ) {
case 'firstsave':
debug("adding checkuniquemail to validation");
+ $ldap_object['objectClass'] = array( 'top', 'inetOrgPerson', 'kolabInetOrgPerson');
$form->entries['uid']['validation'] = 'checkuniquemail';
case 'save':
if( $form->isSubmitted() ) {
@@ -181,7 +182,6 @@ switch( $action ) {
} else {
debug("Process...");
$ldap_object = array();
- $ldap_object['objectClass'] = array( 'top', 'inetOrgPerson', 'kolabInetOrgPerson');
$ldap_object['sn'] = trim($_POST['lastname']);
$ldap_object['cn'] = trim($_POST['firstname']).' '.$ldap_object['sn'];
if( !empty( $_POST['password_0'] ) ) {
diff --git a/www/admin/user/user.php.in b/www/admin/user/user.php.in
index a9711d0..e26a000 100644
--- a/www/admin/user/user.php.in
+++ b/www/admin/user/user.php.in
@@ -128,7 +128,7 @@ function checkuniquealias( $form, $key, $value ) {
foreach( $lst as $alias ) {
debug( "looking at $alias, exluding $dn" );
if( $ldap->countMail( $_SESSION['base_dn'], $alias, $excludedn ) > 0 ) {
- $str .= _('Email address ').MySmarty::htmlentities($alias)._(' collision <br />');
+ $str .= _('Email address ').MySmarty::htmlentities($alias)._(' collides with an address already used for another user, a vCard or a distribution list.<br />');
}
}
return $str;
@@ -144,7 +144,7 @@ function checkuid( $form, $key, $value ) {
$str = '';
foreach( $lst as $uid ) {
if( $ldap->countMail( $_SESSION['base_dn'], $uid, $excludedn ) > 0 ) {
- $str .= _('UID ').MySmarty::htmlentities($uid)._(' collision <br />');
+ $str .= _('UID ').MySmarty::htmlentities($uid)._(' collides with an address already used for another user, a vCard or a distribution list.<br />');
}
}
return $str;
@@ -496,6 +496,7 @@ $form =& new KolabForm( 'user', 'createuser.tpl', $entries );
switch( $action ) {
case 'firstsave':
debug("adding checkuniquemail to validation");
+ $ldap_object['objectClass'] = array('top', 'inetOrgPerson','kolabInetOrgPerson');
$form->entries['mail']['validation'] = array( $form->entries['mail']['validation'], 'checkuniquemail');
case 'save':
if( $form->isSubmitted() ) {
@@ -504,7 +505,6 @@ switch( $action ) {
$content = $form->outputForm();
} else {
$ldap_object = array();
- $ldap_object['objectClass'] = array('top', 'inetOrgPerson','kolabInetOrgPerson');
$ldap_object['sn'] = trim($_POST['sn']);
$ldap_object['cn'] = trim($_POST['givenname']).' '.$ldap_object['sn'];
$ldap_object['givenName'] = trim($_POST['givenname']);
@@ -624,11 +624,6 @@ switch( $action ) {
'(&(objectClass=kolabGroupOfNames)(!(kolabDeleteFlag=*))(member='.$ldap->escape($dn).'))',
array( 'dn', 'mail' ) );
$distlists = $ldap->getEntries();
- unset( $distlists['count'] );
- foreach( $distlists as $distlist ) {
- $dlcn = $distlist['mail'][0];
- $errors[] = sprintf(_("Account DN could not be modified, distribution list <a href='@webserver_web_prefix@/admin/distributionlist/list.php?action=modify&dn=%s'>'%s'</a> depends on it. To modify this account, first remove it from the distribution list."), urlencode($distlist['dn']), $dlcn );
- }
if (($result=ldap_read($ldap->connection,$dn,"(objectclass=*)")) &&
($entry=ldap_first_entry($ldap->connection,$result)) &&