fixed image download
This commit is contained in:
parent
8b50339b57
commit
1e05c1ae9c
|
@ -177,12 +177,14 @@ class lamUserList extends lamList {
|
||||||
elseif ($attribute == "jpegphoto") {
|
elseif ($attribute == "jpegphoto") {
|
||||||
if (sizeof($entry[$attribute][0]) < 100) {
|
if (sizeof($entry[$attribute][0]) < 100) {
|
||||||
// looks like we have read broken binary data, reread photo
|
// looks like we have read broken binary data, reread photo
|
||||||
$result = @ldap_search($_SESSION['ldap']->server(), $entry['dn'], $attribute . "=*");
|
$result = @ldap_search($_SESSION['ldap']->server(), $entry['dn'], $attribute . "=*", array($attribute));
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$tempEntry = @ldap_first_entry($_SESSION['ldap']->server(), $result);
|
$tempEntry = @ldap_first_entry($_SESSION['ldap']->server(), $result);
|
||||||
$binData = ldap_get_values_len($_SESSION['ldap']->server(), $tempEntry, $attribute);
|
if ($tempEntry) {
|
||||||
if (isset($binData['count'])) unset($binData['count']);
|
$binData = ldap_get_values_len($_SESSION['ldap']->server(), $tempEntry, $attribute);
|
||||||
$entry[$attribute] = $binData;
|
if (isset($binData['count'])) unset($binData['count']);
|
||||||
|
$entry[$attribute] = $binData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$jpeg_filename = 'jpg' . $_SESSION['ldap']->new_rand() . '.jpg';
|
$jpeg_filename = 'jpg' . $_SESSION['ldap']->new_rand() . '.jpg';
|
||||||
|
|
Loading…
Reference in New Issue