summaryrefslogtreecommitdiffstats
path: root/lib/private/Group
diff options
context:
space:
mode:
authorLoki3000 <github@labcms.ru>2017-01-10 13:05:21 +0300
committerGitHub <noreply@github.com>2017-01-10 13:05:21 +0300
commit33259b41cd45fa129004c4565405d671e435087f (patch)
tree24169cc835f20b4fbe947a09cafa0123d8b1b45e /lib/private/Group
parent135198bf0dd091768428ac78b70d06d9c7190f27 (diff)
downloadnextcloud-server-33259b41cd45fa129004c4565405d671e435087f.tar.gz
nextcloud-server-33259b41cd45fa129004c4565405d671e435087f.zip
remove non required db requests
Diffstat (limited to 'lib/private/Group')
-rw-r--r--lib/private/Group/Database.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php
index e4144fdbe20..5fe5cf14f39 100644
--- a/lib/private/Group/Database.php
+++ b/lib/private/Group/Database.php
@@ -202,8 +202,11 @@ class Database extends \OC\Group\Backend {
* if the user exists at all.
*/
public function getUserGroups( $uid ) {
+ //guests has empty $uid
+ if (empty($uid)) return [];
+
$this->fixDI();
-
+
// No magic!
$qb = $this->dbConn->getQueryBuilder();
$cursor = $qb->select('gid')