Page 1 of 1

Query LDAP using PHP

Posted: Sun Nov 06, 2005 4:26 pm
by dashwood75
Hello, basically to sum it up,

I have written a web interface to our helpdesk application where users can see the calls that are currently open, along with their status etc.

What I want to do is query who is currently logged in to the OS to then filter the view specifically to that person to save them having to find their own calls.

I am not sure how to go about this, or even if LDAP is needed, so I am putting it to the experts to point me in the right direction..

any advice is appreciated as this is the first thing I have developed using php! :?

Posted: Sun Nov 06, 2005 5:31 pm
by feyd
http://php.net/ldap

As for getting the logged in user, if they log in to the web page it's far more reliable. On Windows networks you may get a REMOTE_USER entry in the $_SERVER array.. but that would depend on a lot of things..

Posted: Mon Nov 07, 2005 10:33 am
by pickle
LDAP isn't necessary here. You could use it for authentication, but it's not practical for seeing who's logged in. A database is better suited for that. A directory services (which LDAP is used to access) purpose is to store lots of information - not have it easily and quickly accessed.

When a person logs in, just capture what their username is and apply that to the filter.