PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
NET_LDAP2

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Networking
View previous topic :: View next topic  
Author Message
dbillmark



Joined: 23 Apr 2008
Posts: 2

PostPosted: Thu Apr 24, 2008 3:24 pm    Post subject: NET_LDAP2 Reply with quote

Hello,
I'm wondering if anyone has tried using a NET_LDAP2 package filter to filter by 'memberOf.'
I'm querying AD for 'real' people and while using a filter to make sure that both a 'sn' and 'givenName' are present works for me, I'd like some added insurance that my result set contains only real people by making sure they are members of the group 'people.'
Currently I'm using this:
$filter_sn = Net_LDAP2_Filter::create('sn', 'any');
$filter_givenName = Net_LDAP2_Filter::create('givenName', 'any');
$filter = Net_LDAP2_Filter::combine('and', array($filter_sn,$filter_givenName));
But because 'memberOf' returns an array, I'm not sure how to go about adding that filter.
Any ideas would be appreciated.
Thanks in advance
Back to top
View user's profile Send private message
dbillmark



Joined: 23 Apr 2008
Posts: 2

PostPosted: Thu Apr 24, 2008 3:49 pm    Post subject: found work around Reply with quote

I'd still be curious to know if anyone finds a way to create this filter, but I was able to create a work around in the meantime.
After querying with a filter for 'sn' and 'givenName' I then just obtained 'memberOf' in my result set and looped the array looking for my group name string.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Networking All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software