summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/User_LDAP.php
Commit message (Collapse)AuthorAgeFilesLines
* Ignore cache in occ ldap:check-ldap commandCôme Chilliet2022-02-211-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>
* move log constants to ILoggerArthur Schiwon2018-04-261-5/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* more consistent namingArthur Schiwon2018-04-051-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* LDAP backend to emit announce and revoke signals on mapping changesArthur Schiwon2018-04-051-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use type casting instead of *val() methodMorris Jobke2018-01-261-3/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* do not catch ServerNotAvailableArthur Schiwon2018-01-261-2/+5
| | | | | | might cause the user to be unavailable (race condition). Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move LDAP user attributes "sync" to background (except for ajax jobs)Arthur Schiwon2017-11-091-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headersMorris Jobke2017-11-061-3/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Plugins infrastructure in User_LDAPVinicius Cubas Brand2017-11-031-2/+60
| | | | Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
* fix LDAP User deletion (cleanup)Arthur Schiwon2017-09-291-13/+11
| | | | | | | | | discovered a bug in the integration test which lead to following a different code path and giving a false-positive success feedback. Also listens now to the evendispatcher instead of old hook system Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* listen to deletion hooks for proper handling, adjust and add testsArthur Schiwon2017-08-311-1/+28
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* simplify returning the homePath and fixing #4117Arthur Schiwon2017-08-311-18/+5
| | | | | | | | homesToKill was not set in runtime since some changes some place else. It required deleteUser() to be called first. The method acts independent of it now. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix commentsMorris Jobke2017-07-251-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #1023 from GitHubUser4234/ldap_password_renew_prblizzz2017-04-241-3/+20
|\ | | | | Handle password expiry in user_ldap
| * restore ldap_password_renew_prRoger Szabo2017-03-311-3/+20
| | | | | | | | Signed-off-by: Roger Szabo <roger.szabo@web.de>
* | Change LDAP method namesMorris Jobke2017-04-121-1/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Update comments to NextcloudMorris Jobke2017-04-111-3/+3
|/ | | | | | | * based on PR by @Ardinis * see #4311 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* LDAP's checkPassword should only catch when a user was not found, fixes #2431Arthur Schiwon2017-01-301-4/+3
| | | | | | Also fixes error processing after ldap_search, due to different return format Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* log exception about user not present on LDAP on login only if loglevel is ↵Arthur Schiwon2016-11-291-8/+11
| | | | | | set to debug Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* restore ldap_password_prroot2016-11-231-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Roger Szabo <roger.szabo@web.de> remove notification part Signed-off-by: Roger Szabo <roger.szabo@web.de> blizzz comments Signed-off-by: Roger Szabo <roger.szabo@web.de> morris comment Signed-off-by: Roger Szabo <roger.szabo@web.de> improved error message for changing password Signed-off-by: Roger Szabo <roger.szabo@web.de> blizz comments 20161013 Signed-off-by: Roger Szabo <roger.szabo@web.de> Signed-off-by: Roger Szabo <roger.szabo@web.de> Adjust HintException usage Signed-off-by: Roger Szabo <roger.szabo@web.de> Signed-off-by: Roger Szabo <roger.szabo@web.de>
* Harden emptyVictor Dubiniuk2016-10-131-3/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* cache loginName2UserName and cover the method with unit testsArthur Schiwon2016-10-071-4/+17
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix a few minor code smellsJörn Friedrich Dreyer2016-08-291-5/+0
|
* Merge pull request #590 from ↵Morris Jobke2016-07-281-2/+8
|\ | | | | | | | | nextcloud/fixing-undefined-OfflineUser-composeAndStoreDisplayName Fix undefined OfflineUser::composeAndStoreDisplayName()
| * [stable9.1] Fix undefined OfflineUser::composeAndStoreDisplayName() - fixes ↵Thomas Müller2016-07-271-2/+8
| | | | | | | | #23248
* | comments amendedroot2016-07-271-1/+1
| |