]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttUserHelper.class.php
Put code to create default roles upon team creation.
[timetracker.git] / WEB-INF / lib / ttUserHelper.class.php
index 4c68645e3ffbecb8d2c72be215380a1e23b2a31c..f88f195d0c3536f2a358f8bfa6558fa7372e585d 100644 (file)
@@ -125,9 +125,9 @@ class ttUserHelper {
       $status_v = ', '.$mdb2->quote($fields['status']);
     }
 
-    $sql = "insert into tt_users (name, login, password, team_id, role, client_id, rate, email $status_f) values (".
+    $sql = "insert into tt_users (name, login, password, team_id, role, role_id, client_id, rate, email $status_f) values (".
       $mdb2->quote($fields['name']).", ".$mdb2->quote($fields['login']).
-      ", $password, $team_id, $role, ".$mdb2->quote($fields['client_id']).", $rate, ".$mdb2->quote($email)." $status_v)";
+      ", $password, $team_id, $role, ".$mdb2->quote($fields['role_id']).", ".$mdb2->quote($fields['client_id']).", $rate, ".$mdb2->quote($email)." $status_v)";
     $affected = $mdb2->exec($sql);
 
     // Now deal with project assignment.
@@ -247,8 +247,6 @@ class ttUserHelper {
   }
 
   // markDeleted - marks user and its associated things as deleted.
-  // TODO: address the problem when a deleted user has a scheduled notification configured,
-  // in which case all other notifications may stop working because of MySQL syntax error.
   static function markDeleted($user_id) {
     $mdb2 = getConnection();
     global $user;