remove empty image tags when no photo is set

This commit is contained in:
Roland Gruber 2016-07-11 19:30:53 +02:00
parent 7ba57d8161
commit 9c57805972
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ class lamUserList extends lamList {
}
}
// show user photos
elseif ($attribute == "jpegphoto") {
elseif (($attribute == "jpegphoto") && (sizeof($entry[$attribute][0]) > 0)) {
if (sizeof($entry[$attribute][0]) < 100) {
// looks like we have read broken binary data, reread photo
$result = @ldap_read($_SESSION['ldap']->server(), escapeDN($entry['dn']), $attribute . "=*", array($attribute), 0, 0, 0, LDAP_DEREF_NEVER);