summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-03-09 16:15:29 +0100
committerRobin Appelman <icewind@owncloud.com>2015-04-27 14:07:15 +0200
commit518d5aadf51318886481696e4308fcc39684b508 (patch)
treef72fa0a77634b55500068d30e8afdb1356ffcefe /lib
parent849e5521de2afdf6efbcb70337079a50f012a6ce (diff)
downloadnextcloud-server-518d5aadf51318886481696e4308fcc39684b508.tar.gz
nextcloud-server-518d5aadf51318886481696e4308fcc39684b508.zip
Allow getting *all* share entries owned by a user
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 227a3d5a411..63bba06e67c 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -2518,4 +2518,16 @@ class Share extends \OC\Share\Constants {
$enforcePassword = $config->getAppValue('core', 'shareapi_enforce_links_password', 'no');
return ($enforcePassword === "yes") ? true : false;
}
+ /**
+ * Get all share entries, including non-unique group items
+ *
+ * @param string $owner
+ * @return array
+ */
+ public static function getAllSharesForOwner($owner) {
+ $query = 'SELECT * FROM `*PREFIX*share` WHERE `uid_owner` = ?';
+ $result = \OC::$server->getDatabaseConnection()->executeQuery($query, [$owner]);
+ return $result->fetchAll();
+ }
+
}