]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttUser.class.php
Some refactoring in plugins.php to make things better.
[timetracker.git] / WEB-INF / lib / ttUser.class.php
index 04273aa78b5c9a1b5bf6771ad5c7b253373c7d98..a6047a7f08d04308d5ea7b7809734fe65068c5d5 100644 (file)
@@ -181,6 +181,16 @@ class ttUser {
     return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode);
   }
 
+  // getPlugins returns plugins string for active group.
+  function getPlugins() {
+    return ($this->behalfGroup ? $this->behalfGroup->plugins : $this->plugins);
+  }
+
+  // getConfig returns config string for active group.
+  function getConfig() {
+    return ($this->behalfGroup ? $this->behalfGroup->config : $this->config);
+  }
+
   // The getActiveUser returns user id on behalf of whom the current user is operating.
   function getActiveUser() {
     return ($this->behalf_id ? $this->behalf_id : $this->id);
@@ -723,6 +733,7 @@ class ttUser {
     $this->behalf_group_name = null;
     $this->behalf_id = null;
     $this->behalf_name = null;
+    unset($this->behalfGroup);
     unset($_SESSION['behalf_group_id']);
     unset($_SESSION['behalf_group_name']);
     unset($_SESSION['behalf_id']);
@@ -744,7 +755,6 @@ class ttUser {
     $this->behalf_group_id = $group_id;
     $this->behalf_group_name = $onBehalfGroupName;
 
-    unset($this->behalfGroup);
     $this->behalfGroup = new ttGroup($this->behalf_group_id, $this->org_id);
 
     // Adjust on behalf user.