X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2FttUser.class.php;h=d320e38156d2c03f662389b020c9addcd44ee257;hb=b8d9247f09f3dfbd35a724ba5ac1b8e433dc1fd1;hp=e6f271df8b4f40178e77ffc95f1c18d27233d469;hpb=337ae7c9f4cf2cabcbf20f6844a6e71562263500;p=timetracker.git diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index e6f271df..d320e381 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -29,6 +29,8 @@ import('ttConfigHelper'); import('ttGroupHelper'); import('ttGroup'); +import('form.Form'); +import('form.ActionForm'); class ttUser { var $login = null; // User login. @@ -214,6 +216,11 @@ class ttUser { return ($this->behalfGroup ? $this->behalfGroup->lock_spec : $this->lock_spec); } + // getWorkdayMinutes returns workday_minutes for active group. + function getWorkdayMinutes() { + return ($this->behalfGroup ? $this->behalfGroup->workday_minutes : $this->workday_minutes); + } + // getConfig returns config string for active group. function getConfig() { return ($this->behalfGroup ? $this->behalfGroup->config : $this->config); @@ -782,6 +789,13 @@ class ttUser { unset($_SESSION['behalf_id']); unset($_SESSION['behalf_name']); + // Destroy report bean if it was set in session. + $form = new Form('dummyForm'); + $bean = new ActionForm('reportBean', $form, $request); + if ($bean->isSaved()) { + $bean->destroyBean(); + } + // Do not do anything if we don't have rights. if (!$this->can('manage_subgroups')) return;