Some more refactoring.
[timetracker.git] / WEB-INF / lib / ttUser.class.php
index bce21e0..36d7136 100644 (file)
@@ -150,14 +150,6 @@ class ttUser {
     return in_array($do_something, $this->rights);
   }
 
-  // isManager - determines whether current user is group manager.
-  // This is a legacy function that we are getting rid of by replacing with rights check.
-  function isManager() {
-    return $this->can('export_data'); // By default this is assigned to managers but not co-managers.
-                                      // Which is sufficient for now until we refactor all calls
-                                      // to this function and then remove it.
-  }
-
   // isClient - determines whether current user is a client.
   function isClient() {
     return $this->is_client;
@@ -361,7 +353,7 @@ class ttUser {
 
     $mdb2 = getConnection();
 
-    $sql =  "select u.id, u.name, u.login, u.role_id, u.status, u.rate, u.email from tt_users u".
+    $sql =  "select u.id, u.name, u.login, u.role_id, u.client_id, u.status, u.rate, u.email from tt_users u".
             " left join tt_roles r on (u.role_id = r.id)".
             " where u.id = $user_id and u.group_id = $this->group_id and u.status is not null".
             " and (r.rank < $this->rank or (r.rank = $this->rank and u.id = $this->id))"; // Users with lesser roles or self.