| Автор
| Сообщение |
 tosha_6400
Новичок

Возраст: 25
Знак зодиака: 
Зарегистрирован: 07.04.2008
Сообщения: 1
|
|
|
Цитата |
|
День добрый, подскажите как мне сделать фильтрацию заблокированных пользователей LDAP, чтобы при выводе всех пользователей скрипт не выводил заблокированных....
<?
echo '<html>
<head>
<meta charset=\'utf-8\'>';
$ldap_host = "192.168.20.10";
$ldap_user ="administrator";
$ldap_pass = "123456";
$connect = ldap_connect( $ldap_host);
ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($connect, LDAP_OPT_REFERRALS, 0);
$bind = ldap_bind($connect, $ldap_user, $ldap_pass);
$f = "objectClass=*";
$read = ldap_search($connect, "OU=people,DC=test,DC=ru", $f);
$entry = ldap_first_entry($connect, $read);
$attrs = ldap_get_attributes($connect,$entry);
$info = ldap_get_entries($connect, $read);
print '<html>';
print '<table border=2>';
print '<tr>';
print '<td>FIO</td>';
print '<td>e-mail</td>';
print '<td>telephone</td>';
print '<td>4</td>';
for ($i=0; $i<$info["count"]; $i++){
echo $info[$i]['ou'][0];
print '<tr>';
echo '<td>'. $info[$i]['displayname'][0],'</td>';
echo "<td>". $info[$i]["mail"][0],"</td>";
echo "<td>". $info[$i]["telephonenumber"][0],"</td>",'<br>';
print '<td></td>';
print '</tr>';
print '</table>';
}
?> |
|
| В начало |
|
 |
|
|
 |
|