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/4] 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/4] 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/4] 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 From 5a4d28334ad7da4e104138a544e2becd01a74de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=81ojewski?= Date: Thu, 14 Jun 2018 19:27:59 +0200 Subject: [PATCH 4/4] Tag version 4.0.0-rc2 --- CHANGELOG.md | 4 ++-- appinfo/info.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cd540f..586b2b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [v4.0.0-rc2] ### Added - User active column @@ -65,6 +65,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Supported version of ownCloud, Nextcloud: ownCloud 10, Nextcloud 12 -[Unreleased]: https://github.com/nextcloud/user_sql/compare/v4.0.0-rc1...develop +[v4.0.0-rc2]: https://github.com/nextcloud/user_sql/compare/v4.0.0-rc1...v4.0.0-rc2 [4.0.0-rc1]: https://github.com/nextcloud/user_sql/compare/v3.1.0...v4.0.0-rc1 [3.1.0]: https://github.com/nextcloud/user_sql/compare/v2.4.0...v3.1.0 diff --git a/appinfo/info.xml b/appinfo/info.xml index 0e5c94b..8827794 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -8,7 +8,7 @@ Retrieve the users and groups info. Allow the users to change their passwords. Sync the users' email addresses with the addresses stored by Nextcloud. - 4.0.0-dev + 4.0.0-rc2 agpl Andreas Böhler <dev (at) aboehler (dot) at> Marcin Łojewski <dev@mlojewski.me>