public function addAction($pActionNotification, $pUser, $forceReload = true)
 {
     if ($pActionNotification instanceof ActionNotification) {
         require_once dirname(__FILE__) . '/DatabaseManager.php';
         $databaseManager = new DatabaseManager();
         $databaseManager->openTable('notifications', json_decode(DatabaseManager::$table5));
         $action = $pActionNotification->getAction();
         $timestamp = $pActionNotification->getMaxTimestamp();
         $readed = $pActionNotification->getReaded();
         if (!empty($pActionNotification->getAdressed())) {
             $insert['text'] = array("value" => $pActionNotification->getAdressed());
         } else {
             $insert['text'] = array("value" => '');
         }
         $insert['title'] = array("value" => '');
         $insert['action'] = array("value" => $action);
         $insert['user'] = array("value" => $pUser);
         $insert['timestamp'] = array("value" => $timestamp, "type" => "integer");
         $insert['type'] = array("value" => 1);
         $insert['readed'] = array("value" => $readed);
         $insert['icon'] = array("value" => "", "type" => "text");
         $databaseManager->insertValue($insert);
         if ($forceReload) {
             $this->forceReload();
         }
     }
 }
 public function addJwtSignature($signature, $name = 'Endgerät', $userid)
 {
     $databaseAuthtokens = new DatabaseManager();
     $json = json_decode(DatabaseManager::$table11);
     $databaseAuthtokens->openTable("jwt", $json);
     $arrayToken['user'] = array('operator' => '=', 'value' => $userid, 'type' => 'i');
     $arrayToken['signature'] = array('operator' => '=', 'value' => $signature, 'type' => 's');
     $arrayToken['name'] = array('operator' => '=', 'value' => $name, 'type' => 's');
     $resultToken1 = $databaseAuthtokens->insertValue($arrayToken);
     return $resultToken1;
 }