diff --git a/lam/lib/types/user.inc b/lam/lib/types/user.inc index 721c7741..62563b70 100644 --- a/lam/lib/types/user.inc +++ b/lam/lib/types/user.inc @@ -720,8 +720,8 @@ class lamUserList extends lamList { } } // show user photos - elseif (($attribute == "jpegphoto") && (sizeof($entry[$attribute][0]) > 0)) { - if (sizeof($entry[$attribute][0]) < 100) { + elseif (($attribute == "jpegphoto") && (!empty($entry[$attribute][0]))) { + if (strlen($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); if ($result) {