Improved explanation of PHP opening tag error.
[timetracker.git] / WEB-INF / lib / ttUser.class.php
index 36f9163..4a2320b 100644 (file)
@@ -167,6 +167,11 @@ class ttUser {
     return ($this->behalfUser ? $this->behalfUser->id : $this->id);
   }
 
+  // getName returns user name on behalf of whom the current user is operating.
+  function getName() {
+    return ($this->behalfUser ? $this->behalfUser->name : $this->name);
+  }
+
   // getQuotaPercent returns quota percent for active user.
   function getQuotaPercent() {
     return ($this->behalfUser ? $this->behalfUser->quota_percent : $this->quota_percent);
@@ -592,7 +597,7 @@ class ttUser {
         return false;
 
       // So far, so good. Check user now.
-      $options = array('group_id'=>$group_id,'status'=>ACTIVE,'max_rank'=>MAX_RANK);
+      $options = array('status'=>ACTIVE,'max_rank'=>MAX_RANK);
       $users = $this->getUsers($options);
       foreach($users as $one_user) {
         if ($one_user['id'] == $this->behalf_id)