3 namespace Friendica\Model;
6 use Friendica\Database\DBA;
9 * Model for user specific operations of items
14 * Returns fields of the user for an item
16 * @param int $id The item id
17 * @param array $fields The fields, which should get returned
20 * @throws Exception In case of a DB-failure
22 public static function getUserForItemId($id, array $fields = [])
24 $item = DBA::selectFirst('item', ['uid'], ['id' => $id]);
29 $user = DBA::selectFirst('user', $fields, ['uid' => $item['uid']]);