diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-15 03:22:06 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-15 03:22:06 +0200 |
commit | 226aec8d5602e112c413f8c0548b18c737a65a02 (patch) | |
tree | aa745db7ea720bfd25ab8d890167885d1c505db4 /lib/files/cache/permissions.php | |
parent | d017bbb065245212e8aa4091f4bee0a4e8ea9055 (diff) | |
parent | 6a788d1a545d5e0dcd6df6ec3c144fa593cf40c8 (diff) | |
download | nextcloud-server-226aec8d5602e112c413f8c0548b18c737a65a02.tar.gz nextcloud-server-226aec8d5602e112c413f8c0548b18c737a65a02.zip |
Merge branch 'master' into files_encryption
Diffstat (limited to 'lib/files/cache/permissions.php')
-rw-r--r-- | lib/files/cache/permissions.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/files/cache/permissions.php b/lib/files/cache/permissions.php index a5c9c144054..faa5ff5eacc 100644 --- a/lib/files/cache/permissions.php +++ b/lib/files/cache/permissions.php @@ -107,4 +107,19 @@ class Permissions { $query->execute(array($fileId, $user)); } } + + /** + * get the list of users which have permissions stored for a file + * + * @param int $fileId + */ + public function getUsers($fileId) { + $query = \OC_DB::prepare('SELECT `user` FROM `*PREFIX*permissions` WHERE `fileid` = ?'); + $result = $query->execute(array($fileId)); + $users = array(); + while ($row = $result->fetchRow()) { + $users[] = $row['user']; + } + return $users; + } } |