LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 6th, 2004, 03:11 PM
musti's Avatar
musti musti is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 25 musti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 41 sec
Reputation Power: 0
Advanced LDAP query ...

My question: I need to lookup information from an LDAP database (duh), but access is very restricted (I have over 4 user_levels now) (access is also based on LDAP information).

I cannot change anything in the database. I just need to write some code.

What do I need?

You have a lot of information about persons in the LDAP. But you can only get information about people of the same deparment as you work in. (so: your departmentNumber HAS to be the same as the departmentNumber of the person you want information of).

Not to difficult, I hear you say. True (this code works)

Code:
$ldap_filter = 'departmentNumber=EH';


But some of us work in more than one deparment. Let's say I work in 'EH' and 'RG'. Then I am allowed to search information about people who work in 'EH' or in 'RG'.

What query ($ldap_filter), do I need for that? I can't find to seem a solution for:
Code:
departmentNumber='EH' OR 'RG'


thx in advance,
musti

Reply With Quote
  #2  
Old January 7th, 2004, 02:46 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,845 Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 20 h 16 m 27 sec
Reputation Power: 634
PHP Code:
 $ldap_filter '(|(departmentNumber=EH)(departmentNumber=RG))'


that should work

here is an RFC on search filters for ldap http://www.rfc-editor.org/rfc/rfc2254.txt

also for some resourse go here http://forums.devshed.com/t63488/s.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > Advanced LDAP query ...

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap