From 9c5780597299f01ab5ff9f7b21b69554f8d8f697 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 11 Jul 2016 19:30:53 +0200 Subject: [PATCH] remove empty image tags when no photo is set --- lam/lib/types/user.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lam/lib/types/user.inc b/lam/lib/types/user.inc index 0fbd9552..ad5820b8 100644 --- a/lam/lib/types/user.inc +++ b/lam/lib/types/user.inc @@ -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);