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

Method deleteByUser

lib/Db/ShareMapper.php:297–306  ·  view source on GitHub ↗

* delete all shares when a share-receiving-user is deleted * * @param $userId * @return bool * @throws Exception */

($userId)

Source from the content-addressed store, hash-verified

295 * @throws Exception
296 */
297 public function deleteByUser($userId)
298 {
299 $sql = $this->db->getQueryBuilder();
300 $sql->select('id', 'item_type', 'item_source', 'type', 'uid_owner', 'uid_initiator')
301 ->from(self::TABLE_NAME)
302 ->where($sql->expr()->eq('uid_owner', $sql->createNamedParameter($userId)))
303 ->andWhere($sql->expr()->eq('type', $sql->createNamedParameter(0)));
304 $this->deleteAuditedShares($sql);
305 return true;
306 }
307
308 /** Update only shares owned by the actor; audit only persisted changes. */
309 private function updateShareField($shareId, string $field, $value, string $action): bool

Callers 1

share-audit.phpFile · 0.45

Calls 2

deleteAuditedSharesMethod · 0.95
eqMethod · 0.80

Tested by

no test coverage detected