Hello!
Romulo Roberto Pereira
rpereira@vox2vox.com
Wed, 30 May 2001 12:09:49 -0400
I am using the following script under a 2.2.5 (IMAP) inside a script with
the following requires:
require '../lib/horde.lib';
require '../config/horde.php3';
require './lib/imp.lib'; /* IMPlib is the IMP function library
*/
require './config/defaults.php3'; /* Defaults configuration file */
require './config/html.php3';
$language = select_lang();
require './lib/postconf.php3';
require "./locale/$language/menu.lang";
require './locale/local/menu.lang';
My script is the following:
$ds=ldap_connect("$ldap_server_ip");
if ($ds)
$r=ldap_bind($ds);
$sr=ldap_search($ds,"ou=Community2,o=vox2u.com", "mail=".$imp->user);
$info = ldap_get_entries($ds, $sr);
for ($i=0; $i<$info["count"]; $i++) {
$record = $info[$i]["dn"];
}
$sr=ldap_search($ds,$record, "billingnumber=*");
$info = ldap_get_entries($ds, $sr);
for ($i=0; $i<$info["count"]; $i++) {
$phone1 = $info[$i]["snr"][0];
$phone2 = $info[$i]["snr"][1];
$phone3 = $info[$i]["snr"][2];
}
ldap_close($ds);
}
$imp->user is not bringing the username... anybody knows why?
TIA,
Rom