From acb73a3d5c540333ac5fb25405ec0d4a8c0a49ec Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Wed, 24 Aug 2016 13:16:15 -0400
Subject: [PATCH] Deleting users now deletes their resource tags.

---
 module/VuFind/src/VuFind/Db/Row/User.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/module/VuFind/src/VuFind/Db/Row/User.php b/module/VuFind/src/VuFind/Db/Row/User.php
index 69dda547eaf..4d8cefe9103 100644
--- a/module/VuFind/src/VuFind/Db/Row/User.php
+++ b/module/VuFind/src/VuFind/Db/Row/User.php
@@ -610,6 +610,8 @@ class User extends RowGateway implements \VuFind\Db\Table\DbTableAwareInterface,
             $list = $table->getExisting($current->id);
             $list->delete($this, true);
         }
+        $resourceTags = $this->getDbTable('ResourceTags');
+        $resourceTags->destroyLinks(null, $this->id);
 
         // Remove the user itself:
         return parent::delete();
-- 
GitLab