public function stop_track($id_task, $message = false, $id_user = false){
    $ok = false;
    $now = time();
    if (
      ($active_track = $this->get_active_track($id_user)) &&
      ($active_track['id_task'] === $id_task)
    ){
      $ok = true;
      if (
        !empty($message) &&
        !($id_note = $this->comment($id_task, [
          'title' => _('Report tracker').' '.date('d M Y H:i', strtotime($active_track['start'])).' - '.date('d M Y H:i', $now),
          'text' => $message
        ]))
      ){
        $ok = false;
      }
      if ( $ok ){
        $ok = $this->db->update('bbn_tasks_sessions', [
          'length' => $now - strtotime($active_track['start']),
          'id_note' => $id_note ?: NULL
        ], [
          'id' => $active_track['id']
        ]);
      }
    }
    return (bool)$ok;
  }