Add support for AD proxyaddresses attribute in
LDAPEngine.
proxyaddresses is a multivalued field and each address
is prefaced with the type of address it is.
smtp: (lowercase smtp for non primary addresses)
SMTP: (uppercase SMTP for primary address (this would
be the same as what you found in the mail attribute).
x400: for x400 addresses
and on and on.
I hacked this ugly snippet in to make it support the
proxyaddresses minimally. Ideally you would actually
want to filter out non smpt addresses, to keep the
list of addresses assigned to the user clean. If
knowing the users address is important keep in mind
that the address prefaced with uppercase SMTP would be
the primary.
foreach ( $this->mailAttr as
$value ) {
// For single value or
multiple value attribute
for ($i=0; $i<$entries
[0][strtolower($value)]["count"]; $i++) {
$tmp =
strtolower($entries[0][strtolower($value)][$i]);
$addr =
str_replace("smtp:", "", $tmp);
array_push(
$this->emailAddress, $addr );
}
}
Good work i love this thing.
-Matt
mbegan@gmail.com