Skip to content

Commit

Permalink
Allow getting *all* share entries owned by a user
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Mar 9, 2015
1 parent 8566b56 commit 7a80ec9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/private/share/share.php
Original file line number Diff line number Diff line change
Expand Up @@ -2368,4 +2368,16 @@ public static function getExpireInterval() {
return (int)\OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7');
}

/**
* 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();
}

}

0 comments on commit 7a80ec9

Please sign in to comment.