From: hickert Date: Thu, 3 Aug 2006 05:52:18 +0000 (+0000) Subject: Fixed date of birth && userPicture X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3e3d24045159cbcbff965d9df3d20a4393c289c5;p=gosa.git Fixed date of birth && userPicture git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4371 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 198f7aba0..cf5cb5a34 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -221,7 +221,7 @@ class user extends plugin $date = $this->dateOfBirth; }else{ $date = getdate($this->dateOfBirth); - } + } } $days= array(); @@ -299,7 +299,7 @@ class user extends plugin } /* Want picture edit dialog? */ - if($this->acl_is_readable("userPicture")) { + if($this->acl_is_writeable("userPicture")) { if (isset($_POST['edit_picture'])){ /* Save values for later recovery, in case some presses the cancel button. */ @@ -669,9 +669,6 @@ class user extends plugin /* Only force save of changes .... If this attributes aren't changed, avoid saving. */ - if ($this->use_dob == "1"){ - $this->dateOfBirth= date("Y-m-d", $this->dateOfBirth); - } if($this->gender=="0") $this->gender =""; if($this->preferredLanguage=="0") $this->preferredLanguage =""; @@ -679,6 +676,10 @@ class user extends plugin /* First use parents methods to do some basic fillup in $this->attrs */ plugin::save (); + if ($this->use_dob == "1"){ + $this->attrs['dateOfBirth'] = date("Y-m-d", $this->dateOfBirth); + } + /* Remove additional objectClasses */ $tmp= array(); foreach ($this->attrs['objectClass'] as $key => $set){ diff --git a/plugins/personal/generic/main.inc b/plugins/personal/generic/main.inc index 840bc7423..c01542f94 100644 --- a/plugins/personal/generic/main.inc +++ b/plugins/personal/generic/main.inc @@ -34,6 +34,8 @@ if (!$remove_lock){ /* Create user object on demand */ if (!isset($_SESSION['user']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['user']= new user ($config, $ui->dn); + $_SESSION['user']->set_acl_base($ui->dn); + $_SESSION['user']->set_acl_category("users"); } $user= $_SESSION['user'];