[phpldapadmin] [ phpldapadmin-Bugs-1891966 ] multipile basedn, modify group members problem

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.ldap.davedap
Message-ID <[email protected]>
Bugs item #1891966, was opened at 2008-02-13 01:17
Message generated for change (Comment added) made by wurley
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=1891966&group_id=61828

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 1.1.x
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Gabor Nemeth (ngabcsi)
Assigned to: Kimmo Koivisto (is95kiko)
Summary: multipile basedn, modify group members problem

Initial Comment:
Hello!

I have got two basedn!
The second basedn haven't got uid, uidNumber....

My config.php :
$config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid');
$config->custom->modify_member['filter'] = '(&(objectclass=posixAccount)(!(uid=*$)))';
....

When I modify group members, I reanding error message:
E_WARNING: sort() expects parameter 1 to be array, null given
File  /home/ngabor/project/ldap/phpldapadmin-1.1.0.5/htdocs/modify_member_form.php (85)

The row 85 is sort($possible_members);
end the $possible_members is empty! Because my second basedn hasn't got 'member','uniqueMember','memberUid' etc....

I have got idea, modify in 
'# Loop through all base dn's and search possible member entries' section:

$possible_values = array(); //new line
foreach ($ldapserver->getBaseDN() as $base_dn) {

	# Get all entries that can be added to the group

	if (preg_match("/^$attr$/i",$_SESSION[APPCONFIG]->GetValue('modify_member','posixgroupattr')))
		$possible_values = array_merge($ldapserver->search(null,$base_dn,
			$_SESSION[APPCONFIG]->GetValue('modify_member','posixfilter'),
			array($_SESSION[APPCONFIG]->GetValue('modify_member','posixattr'))), $possible_values); // modify line
	else
		$possible_values = array_merge($ldapserver->search(null,$base_dn,
			$_SESSION[APPCONFIG]->GetValue('modify_member','filter'),
			array($_SESSION[APPCONFIG]->GetValue('modify_member','attr'))), $possible_values);  //modify line
}


----------------------------------------------------------------------

>Comment By: Deon George (wurley)
Date: 2008-11-28 14:45

Message:
I couldnt reproduce your problem, but I did add
$possible_members = array(); to line 77, which should help avoid this
problem.

http://phpldapadmin.cvs.sourceforge.net/viewvc/phpldapadmin/phpldapadmin/htdocs/modify_member_form.php?r1=1.5.2.1&r2=1.5.2.2&pathrev=BRANCH-1_1_0

Let me know if it is still a problem, and give me an LDIF of your
environment so that I can re-produce it.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=1891966&group_id=61828

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.