+
+ // Update created_by field for the team with user id, now that we have it.
+ $sql = "update tt_teams set created_by = $user_id where id = $this->group_id and created_by is null";
+ $affected = $mdb2->exec($sql);
+
+ // Update created_by field for user by setting to self.
+ $sql = "update tt_users set created_by = $user_id where id = $user_id and team_id = $this->group_id and created_by is null";
+ $affected = $mdb2->exec($sql);
+