Author: leithoff
Date: Wed Nov 4 12:21:30 2009
New Revision: 28255
URL:
http://www.egroupware.org/viewvc/egroupware?rev=28255&view=revLog:
bugfix groupmembers of groups got lost, while renaming accounts
Modified:
branches/1.6/phpgwapi/inc/class.accounts_ldap.inc.php
Modified: branches/1.6/phpgwapi/inc/class.accounts_ldap.inc.php
URL:
http://www.egroupware.org/viewvc/egroupware/branches/1.6/phpgwapi/inc/class.accounts_ldap.inc.php?rev=28255&r1=28254&r2=28255&view=diff==============================================================================
--- branches/1.6/phpgwapi/inc/class.accounts_ldap.inc.php (original)
+++ branches/1.6/phpgwapi/inc/class.accounts_ldap.inc.php Wed Nov 4 12:21:30 2009
@@ -705,7 +705,7 @@
$order = $propertyMap[$param['order']] ? $propertyMap[$param['order']] : 'uid';
$sri = ldap_search($this->ds, $this->user_context, $filter,array('uid', $order));
$fullSet = array();
- foreach (ldap_get_entries($this->ds, $sri) as $key => $entry)
+ foreach ((array)ldap_get_entries($this->ds, $sri) as $key => $entry)
{
if ($key !== 'count') $fullSet[$entry['uid'][0]] = $entry[$order][0];
}
@@ -941,7 +941,7 @@
$sri = ldap_search($this->ds,$this->group_context,'(&(objectClass=posixGroup)(memberuid='.ldap::quote($account_lid).'))',array('cn','gidnumber'));
$memberships = array();
- foreach(ldap_get_entries($this->ds, $sri) as $key => $data)
+ foreach((array)ldap_get_entries($this->ds, $sri) as $key => $data)
{
if ($key === 'count') continue;
@@ -959,7 +959,12 @@
*/
function members($gid)
{
- if (!is_numeric($gid)) return false;
+ if (!is_numeric($gid))
+ {
+ // try to recover
+ $gid = $this->name2id($gid,'account_lid','g');
+ if (!is_numeric($gid)) return false;
+ }
$gid = abs($gid); // our gid is negative!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
eGroupWare-cvs mailing list
eGroupWare-cvs@...
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs