steffen: server/kolab-webadmin/kolab-webadmin/www/admin/sharedfolder sf.php, 1.10, 1.11

cvs at intevation.de cvs at intevation.de
Fri Aug 13 12:03:43 CEST 2004


Author: steffen

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/sharedfolder
In directory doto:/tmp/cvs-serv23136/kolab-webadmin/www/admin/sharedfolder

Modified Files:
	sf.php 
Log Message:
issue215

Index: sf.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/sharedfolder/sf.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sf.php	13 Aug 2004 01:04:16 -0000	1.10
+++ sf.php	13 Aug 2004 10:03:41 -0000	1.11
@@ -45,14 +45,14 @@
 	list($u, $p ) = split( ' ', $acl, 2 );
 	if( !strncmp( "group:", $u, 6 ) ) $u = substr( $u, 6 );
 	//debug( "u=$u, p=$p" );
-	$form->entries['acl_'.$aclcount] = array( 'name' => _('Permission for UID/GID'),
+	$form->entries['acl_'.$aclcount] = array( 'name' => _('Permission for UID/email/GID'),
 											  'type' => 'aclselect',
 											  'user' => $u,
 											  'perm' => $p
 											  );
 	$aclcount++;
   }
-  $form->entries['acl_'.$aclcount] = array( 'name' => _('Permission for UID/GID'),
+  $form->entries['acl_'.$aclcount] = array( 'name' => _('Permission for UID/email/GID'),
 											'type' => 'aclselect',
 											'user' => '',
 											'perm' => 'all'
@@ -69,12 +69,14 @@
 	// Special users allowed
 	return "$uid $perm";
   }
-  $res = $ldap->search( $_SESSION['base_dn'], '(&(uid='.$ldap->escape($uid).')(objectClass=kolabInetOrgPerson))', 
-						array('dn') );
+  $res = $ldap->search( $_SESSION['base_dn'], '(&(|(uid='.$ldap->escape($uid).')(mail='.$ldap->escape($uid).')(alias='.$ldap->escape($uid).'))(objectClass=kolabInetOrgPerson))', 
+						array('dn', 'mail' ) );
   if( $ldap->count($res) == 1 ) {
 	// Ok, we have a regular user
+	$entries = $ldap->getEntries();
+	$mail = $entries[0]['mail'][0];
 	$ldap->freeSearchResult();
-	return "$uid $perm";
+	return "$mail $perm";
   }
   
   $regs = array();





More information about the commits mailing list