From 7649d230529ba390a54ba21d0c9808ce75c51cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=81ojewski?= Date: Fri, 11 May 2018 18:28:37 +0200 Subject: [PATCH 1/3] Manage limit and offset in usersInGroup function Since user_sql apps don't manage limit and offset in **usersInGroup** function: `$rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => $gid), false, true);` The unshareFromGroup function of **Activity** app start a infinity loop : ``` while (!empty($users)) { $this->addNotificationsForGroupUsers($users, 'unshared_by', $share->getNodeId(), $share->getNodeType(), $share->getTarget(), $share->getId()); $offset += self::USER_BATCH_SIZE; $users = $group->searchUsers('', self::USER_BATCH_SIZE, $offset); } ``` to fix that, just add offset and limit params to runQuery : ``` $rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => $gid), false, true, ['limit' => $limit, 'offset' => $offset]); ``` --- ...$this -> helper -> runQuery('getGroupUsers', array('gid' =>} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename lib/{group_sql.php => $rows = $this -> helper -> runQuery('getGroupUsers', array('gid' =>} (97%) diff --git a/lib/group_sql.php b/lib/$rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => similarity index 97% rename from lib/group_sql.php rename to lib/$rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => index b0c1c06..363f7f9 100644 --- a/lib/group_sql.php +++ b/lib/$rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => @@ -64,7 +64,7 @@ class OC_GROUP_SQL extends \OC_Group_Backend implements \OCP\GroupInterface Util::writeLog('OC_USER_SQL', "Group table not configured", Util::DEBUG); return []; } - $rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => $gid), false, true); + $rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => $gid), false, true, ['limit' => $limit, 'offset' => $offset]); if($rows === false) { Util::writeLog('OC_USER_SQL', "Found no users for group", Util::DEBUG); From 393bdf97f90a71917c9f48cf9122643df6c46c6c Mon Sep 17 00:00:00 2001 From: Ko- Date: Wed, 30 May 2018 13:02:53 +0200 Subject: [PATCH 2/3] Fix filename of group_sql.php --- ... -> runQuery('getGroupUsers', array('gid' => => group_sql.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/{$rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => => group_sql.php} (100%) diff --git a/lib/$rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => b/lib/group_sql.php similarity index 100% rename from lib/$rows = $this -> helper -> runQuery('getGroupUsers', array('gid' => rename to lib/group_sql.php From 8d1e9cddcb2f5b8669f566bb2722bd34bf13211c Mon Sep 17 00:00:00 2001 From: pedro-nonfree Date: Fri, 1 Jun 2018 10:58:25 +0200 Subject: [PATCH 3/3] update Column Settings for wordpress fixes #36 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1ec67ec..50fb666 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,9 @@ In the Nextcloud Column Settings of SQL User Backend, configure it as Table: wp_users Username Column: user_login Password Column: user_pass +Real Name Column: display_name Encryption Type: Joomla > 2.5.18 phppass +User Active Column: user_status ``` ### JHipster