aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/User_LDAP.php
Commit message (Collapse)AuthorAgeFilesLines
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-211-13/+4
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-151-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Use more gender neutral languageprovokateurin2024-10-141-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-12/+12
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(user_ldap): Correctly cache that user exists to avoid a request on ↵Côme Chilliet2024-08-271-2/+0
| | | | | | mapping new user Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(user_ldap): Avoid extra LDAP request when mapping a user for the first timeCôme Chilliet2024-08-271-3/+2
| | | | | | | | Avoids using several LDAP searches to get UUID, display name and internal name, now gets all attributes at the same time. Also avoids extra request to build an unused user object in userExists. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-4/+4
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Use cache in LDAP backend's checkPasswordAkhil2024-08-161-11/+9
| | | | Signed-off-by: Akhil <akhil@e.email>
* fix(LDAP): remove unneeded dependenciesArthur Schiwon2024-08-011-6/+0
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-301-35/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat: Add back searching in disabled user listCôme Chilliet2024-05-231-1/+1
| | | | | | | | When disabled users where moved to their own endpoint we overlooked search, so adding it back. The search is done case-insensitive in uid and display name. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Remove obsolete resource typingCôme Chilliet2024-04-091-1/+1
| | | | | | In PHP>=8.1, LDAP and FTP resources are always typed objects Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Invert parameter order in getDisabledUserList to be consistentCôme Chilliet2023-11-301-1/+1
| | | | | | | This matches what was done in the calls and so fixes getting disabled user list when there are several backends returning disabled users. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add method to list disabled users to IProvideEnabledStateBackendCôme Chilliet2023-06-291-0/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix since annotations and add boolean return type for setUserEnabledCôme Chilliet2023-06-201-1/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use DI for DeletedUsersIndex and fix testsCôme Chilliet2023-05-251-21/+15
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* [user_ldap] Add per-connection setting for marking remnants as disabledCôme Chilliet2023-05-231-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use the new IProvideEnabledStateBackend interface in user_ldapCôme Chilliet2023-05-231-5/+22
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* also unmark deleted ldap user when checking the ldap entryRobin Appelman2023-03-021-2/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge branch 'master' into fix/clean-ldap-access-factory-usageCôme Chilliet2022-11-211-1/+6
|\ | | | | Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * Expose mapped user count from LDAP and use that for user limit checkCôme Chilliet2022-10-241-2/+7
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix return type for countUsers methodCôme Chilliet2022-10-251-2/+2
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use "use" to import namespacesCarl Schwan2022-03-141-1/+3
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix psalm issue about userCountsCarl Schwan2022-03-111-1/+2
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix PHP 8.1 support for user_ldap applicationCôme Chilliet2021-12-161-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Check LDAP upon user deletion instead of refusing based on cached informationCôme Chilliet2021-11-231-7/+21
| | | | | | | This should avoid having to wait for background job to run after deleting a user in LDAP before being able to delete it in Nextcloud. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Ignore cache in occ ldap:check-ldap commandCôme Chilliet2021-11-221-5/+6
| | | | | | | | | This avoids having to wait or reset the cache after deleting a user in the LDAP. This also fixes a PHP error when running ldap:check-ldap --update on a deleted but cached user. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use Psr\Log\LoggerInterface where it can easily be used in user_ldapCôme Chilliet2021-10-141-14/+28
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix parameter types in docsJoas Schilling2021-03-171-5/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* clear LDAP cache after user deletionArthur Schiwon2020-06-081-0/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headers for 19Christoph Wurst2020-04-291-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-32/+31
| | | | | | | | | | | | | | | 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-081-12/+12
| | | | 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>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* decouple userExists from userExistsOnLDAP checkArthur Schiwon2020-01-081-7/+13
| | | | | | | allows to mark users as offline right away, avoids a gap of being not a user and causing weird side effects Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* relax strict getHome behaviour for LDAP users in a shadow stateArthur Schiwon2020-01-081-29/+3
| | | | | | | | * simplifies deletion process * less strange behaviour when looking up home storage (as long as it is local) * thus could enable transfer ownerships after user went invisible on ldap Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headersChristoph Wurst2019-12-051-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* invalidates user when plugin reported deletion successArthur Schiwon2019-06-261-3/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* ensures mapping of chosen useridArthur Schiwon2019-06-191-2/+20
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* caches the displayname after an LDAP plugin set itArthur Schiwon2019-06-181-1/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* set the loglevel in context, save the conditionArthur Schiwon2019-04-021-3/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* LDAP plugin: force createUser to return new user's DNVinicius Cubas Brand2019-03-211-1/+2
| | | | | | | LDAP plugins must change the createUser method to return the DN, as we need this to update the cache. Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
* fix user creation using LDAP PluginVinicius Cubas Brand2019-03-211-2/+10
| | | | Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
* Check if user is null before getUsernameDaniel Kesselberg2018-09-161-5/+7
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* don't force LDAP updates on userExists anymoreArthur Schiwon2018-08-141-9/+1
| | | | | | and remove some deprecated code Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* allow admin to disable fetching of avatars as well as a specific attributeArthur Schiwon2018-07-051-1/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* let user set avatar in nextcloud von LDAP provides invalid image dataArthur Schiwon2018-07-031-3/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>