From: hickert Date: Thu, 10 Aug 2006 07:09:14 +0000 (+0000) Subject: Fixed picture_loading. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f6ae7096a6dd9a67c5041bf75ca906282c64ede9;p=gosa.git Fixed picture_loading. Acls aren't set in constructor, and so acl check ever failed git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4459 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 32d0ba402..6f5bd912c 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -1154,20 +1154,18 @@ class user extends plugin /* Load picture from file to object */ function set_picture($filename ="") { - if($this->acl_is_writeable("userPicture",(!is_object($this->parent) && !isset($_SESSION['edit'])))){ - if (!is_file($filename) || $filename =="" ){ - $filename= "./images/default.jpg"; - $this->jpegPhoto= "*removed*"; - } + if (!is_file($filename) || $filename =="" ){ + $filename= "./images/default.jpg"; + $this->jpegPhoto= "*removed*"; + } - $fd = fopen ($filename, "rb"); - $this->photoData= fread ($fd, filesize ($filename)); - $_SESSION['binary']= $this->photoData; - $_SESSION['binarytype']= "image/jpeg"; - $this->jpegPhoto= ""; + $fd = fopen ($filename, "rb"); + $this->photoData= fread ($fd, filesize ($filename)); + $_SESSION['binary']= $this->photoData; + $_SESSION['binarytype']= "image/jpeg"; + $this->jpegPhoto= ""; - fclose ($fd); - } + fclose ($fd); }