diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-06-07 13:04:56 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-06-07 13:04:56 +0300 |
commit | 3f5169c9c263fc41028f91ce9a73df3e35bc5899 (patch) | |
tree | 29835155345eb7b79bccaac5310856a06832f7ac /lib/Db | |
parent | efc373373d0e577f9d1dd605abfb142a13ef69d3 (diff) |
Implement guestName for public shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/Db')
-rw-r--r-- | lib/Db/Session.php | 3 | ||||
-rw-r--r-- | lib/Db/SessionMapper.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Db/Session.php b/lib/Db/Session.php index 5801ea0ab..dc3bc9b7d 100644 --- a/lib/Db/Session.php +++ b/lib/Db/Session.php @@ -49,7 +49,8 @@ class Session extends Entity implements \JsonSerializable { 'userId' => $this->userId, 'token' => $this->token, 'color' => $this->color, - 'lastContact' => $this->lastContact + 'lastContact' => $this->lastContact, + 'guestName' => $this->guestName ]; } } diff --git a/lib/Db/SessionMapper.php b/lib/Db/SessionMapper.php index aa8b081a0..36e355d00 100644 --- a/lib/Db/SessionMapper.php +++ b/lib/Db/SessionMapper.php @@ -64,7 +64,7 @@ class SessionMapper extends QBMapper { public function findAllActive($documentId) { /* @var $qb IQueryBuilder */ $qb = $this->db->getQueryBuilder(); - $qb->select('id','color','document_id', 'last_contact','user_id') + $qb->select('id','color','document_id', 'last_contact','user_id','guest_name') ->from($this->getTableName()) ->where($qb->expr()->eq('document_id', $qb->createNamedParameter($documentId))) ->andWhere($qb->expr()->gt('last_contact', $qb->createNamedParameter(time()-SessionService::SESSION_VALID_TIME))) |