MCPcopy Create free account
hub / github.com/Rello/analytics / deleteByUser

Method deleteByUser

lib/Service/ReportService.php:394–403  ·  view source on GitHub ↗

* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */

(string $userId)

Source from the content-addressed store, hash-verified

392 * @throws Exception
393 */
394 public function deleteByUser(string $userId) {
395 $reports = $this->ReportMapper->indexByUser($userId);
396 foreach ($reports as $report) {
397 $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_REPORT, $report['id']);
398 $this->ThresholdMapper->deleteThresholdByReport($report['id']);
399 $this->setFavorite($report['id'], 'false');
400 $this->ReportMapper->delete($report['id']);
401 }
402 return true;
403 }
404
405 /**
406 * get own reports which are marked as favorites

Callers

nothing calls this directly

Calls 5

setFavoriteMethod · 0.95
indexByUserMethod · 0.45
deleteSharesByItemMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected