summaryrefslogtreecommitdiffstats
path: root/lib/private/Group/Database.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-2/+2
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Build query once instead of in-loopCôme Chilliet2023-09-071-5/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm spotted type errorsCôme Chilliet2023-09-051-8/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Move new methods to a new interface in OCPCôme Chilliet2023-09-051-0/+2
| | | | | | | This avoids breaking compatibility for group backends not based on ABackend abstract class. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add batch methods in user backendsCarl Schwan2023-09-051-5/+80
| | | | | | This allows for faster group search with significantly less DB traffic Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* fix: getGroups limit check syntaxJohn Molakvoæ2023-05-111-1/+1
| | | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
* also update groupinterface and database backendRobin Appelman2023-05-111-3/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Clear up return typesCôme Chilliet2023-04-271-2/+2
| | | | | | usersInGroup index by int for BC, searchInGroup index by uid (string). Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Split new method in a new group backend interfaceCarl Schwan2023-04-271-49/+8
| | | | | | Better for backward compatibility, also move new interfaces to nc 26 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Optimize retrieving display name when searching for users in a groupCarl Schwan2023-04-271-0/+52
| | | | | | | | | This is recurrent scenario that we are searching for users and then for each users we fetch the displayName. This is inefficient, so instead try to do one query to fetch everything (e.g. Database backend) or use the already existing DisplayNameCache helper. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* composer run cs:fixCôme Chilliet2023-01-201-10/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-18/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix indentation errorTom Grant2021-03-171-4/+4
| | | | Signed-off-by: tgrant <tom.grant760@gmail.com>
* Fix null displayname crash as described in #21885tgrant2021-03-171-1/+5
| | | | Signed-off-by: tgrant <tom.grant760@gmail.com>
* Show group backends in occ group:list --info and group:infoJohannes Leuker2021-03-011-1/+12
| | | | Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-081-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Search also the email and displayname in user mangement for groupsMorris Jobke2020-08-051-6/+18
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow group search by display nameChristoph Wurst2020-06-101-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Improve group queriesRoeland Jago Douma2020-05-021-6/+20
| | | | | | | | | | | Before we'd also get the diplayname for each group in the backend. In a separate query. This is of course not ideal as this information is obtained on each and every query. Now this is queried once and properly cached. Also added more caching to the manager. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Format code according to PSR2Christoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-5/+4
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix mismatching docblock return typesChristoph Wurst2020-03-061-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-3/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Allow group displaynames in the database backend (#17221)John Molakvoæ2019-10-051-4/+56
|\ | | | | Allow group displaynames in the database backend
| * Do not allow to have an empty display nameJoas Schilling2019-09-271-0/+6
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Fix DI issueJoas Schilling2019-09-271-0/+4
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Remove inherited docsJoas Schilling2019-09-271-16/+0
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Allow to set the group display name in the database backendJoas Schilling2019-09-271-1/+23
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Add a displayname to the database group backendJoas Schilling2019-09-271-3/+39
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix DB usersInGroups fetchingRoeland Jago Douma2019-10-021-3/+8
|/ | | | | | | * Follow the interface defaults * Only set limit or offset if they are properly set Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #12419 from ↵Morris Jobke2018-11-121-4/+10
|\ | | | | | | | | nextcloud/bugfix/noid/group-creation-replace-insertIfNotExist Fix UniqueConstraintViolationException while insert into oc_groups
| * Fix UniqueConstraintViolationException while insert into oc_groupsMorris Jobke2018-11-121-4/+10
| | | | | | | | | | | | | | * fixes race condition in insert * fixes potentiaol deadlock Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use the defined func()->count() instead of manual countingJoas Schilling2018-11-081-1/+1
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Properly escape column name in "createFunction" callMorris Jobke2018-10-161-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Tabs fixJohn Molakvoæ (skjnldsv)2018-05-251-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Added disabled count per groupsJohn Molakvoæ (skjnldsv)2018-05-241-0/+35
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Convert group Database backendRoeland Jago Douma2018-04-231-7/+21
| | | | | | This now uses the new interfaces Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove orderBy so the query works correctly on postgresJoas Schilling2018-03-271-2/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make sure DI is doneJoas Schilling2018-03-261-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move the group database backend fully to query builderJoas Schilling2018-03-261-32/+54
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use type casting instead of *val() methodMorris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-061-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* spaces addedLoki30002017-01-101-1/+1
|
* allowed '0' uidLoki30002017-01-101-2/+2
|
* fix spacesLoki30002017-01-101-1/+1
|
* fix bracketsLoki30002017-01-101-2/+4
|