Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Dane uzytkownika przez LDAP - problem
pawelapaciorek
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 19.06.2008

Ostrzeżenie: (0%)
-----


Witam,
mam do popbrania dane o użytkownikach przez LDAP.
Uwierzytelniłem sie, użyłem funckji ldap_search i w zamian dostaje: bład numer 10, Refferal.

Trochę grzebałem po sieci, ale nie wiele mi to powiedziało,może mnie ktoś olśnić (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Pozdrawiam
Paweł
Go to the top of the page
+Quote Post
nexis
post
Post #2





Grupa: Zarejestrowani
Postów: 1 012
Pomógł: 109
Dołączył: 26.09.2003
Skąd: nexis.pl

Ostrzeżenie: (0%)
-----


Może pokażesz kod?
Go to the top of the page
+Quote Post
pawelapaciorek
post
Post #3





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 19.06.2008

Ostrzeżenie: (0%)
-----


no jasne, sorry, że nie zrobiłem tego od razu.

  1. <?php
  2. function search($filter=null,$field=null) {
  3.  
  4.  
  5.        if ($filter==null) {
  6.            $filter = "(|(samaccountname=USERNAME))";
  7.        }
  8.  
  9.        if ($field == null) {
  10.            $field = array("cn", "sn", "mail");
  11.        }
  12.  
  13.        $search = ldap_search($this->_conn,"ou=User Accounts,ou=User Accounts and Groups,ou=Exchange,o=Exchange, dc=DOMENA", $filter, $field);
  14.  
  15.      
  16.        $info = ldap_get_entries($this->_conn, $search);
  17.        return $info;
  18.  
  19.    }
  20. ?>


Ten post edytował pawelapaciorek 19.11.2008, 12:36:17
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 03:23