aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Connection.php
Commit message (Collapse)AuthorAgeFilesLines
...
* Add return type for writeToCacheDaniel Kesselberg2021-06-151-4/+2
| | | | | | writeToCache does not return a string. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* do not die after LDAP auth failed with expired accArthur Schiwon2021-03-011-3/+6
| | | | | | - some servers return error code 53 Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Use query builder instead of OC_DB in user_ldapJoas Schilling2020-11-061-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* tame psalm. why does it ignore '@property'?Arthur Schiwon2020-10-191-5/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* do not flip available state to unavailable, allow empty resultsArthur Schiwon2020-08-111-0/+1
| | | | | | | | | - the detection relies that the first, requested result is not empty - it might be empty though – groups without members - protect switching from available to unavailable - switching the other way around was also not envisaged either Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* tidy up Group_LDAPArthur Schiwon2020-06-081-0/+5
| | | | | | | | | | * remove unused method * resolve code duplication * remove usage of deprectad Util::writeLog * phpDoc updates * signature updates Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-58/+55
| | | | | | | | | | | | | | | 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>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-3/+3
| | | | 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-10/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* treat LDAP error 50 as auth issue, prevents lost server connection errorsArthur Schiwon2019-10-181-1/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* group display name support (service level + ldap)Arthur Schiwon2019-05-271-0/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix nested group retrieval also for 2 other casesArthur Schiwon2019-03-051-0/+3
| | | | | | and also consolidate logic in one method Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* add LDAP ConfigHandler for external storages and "$home" varArthur Schiwon2019-02-141-0/+2
| | | | | | | | * handler registered upon OCA\\Files_External::loadAdditionalBackends event as user_ldap is loaded before files_external * new configuration field "ldapExtStorageHomeAttribute" (not in GUI yet) Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* functions that were checked for are present since PHP 5.4, supported is >=/Arthur Schiwon2018-10-251-9/+0
| | | | | | | * so the check from older days is really not necessary anymore * resolves #10923 Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Only bind if configuration for the first server is availableJulius Härtl2018-07-131-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* allow admin to disable fetching of avatars as well as a specific attributeArthur Schiwon2018-07-051-0/+10
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #10034 from nextcloud/fix/noid/ldap-silence-quota-logmsgsblizzz2018-06-281-0/+3
|\ | | | | lower log level for quota manipulation cases
| * lower log level for quota manipulation casesArthur Schiwon2018-06-281-0/+3
| | | | | | | | | | | | and simplify the forest of ifs a little bit Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | LDAP backup server should not be queried when auth failsArthur Schiwon2018-06-271-8/+4
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* unbound cloned connection fixRoger Szabo2018-04-271-0/+3
| | | | Signed-off-by: Roger Szabo <roger.szabo@web.de>
* move log constants to ILoggerArthur Schiwon2018-04-261-33/+45
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* use hash algo that's robust against collisionsArthur Schiwon2018-03-021-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* track the state of the bind resultArthur Schiwon2018-02-221-2/+29
| | | | 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
| | | | | | It should be up to 6x faster Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* don't show recurring msg when pages result was turned offArthur Schiwon2017-12-211-1/+1
| | | | | | and only as debug level otherwise. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* don't use deprecated method for requesting memcacheArthur Schiwon2017-12-181-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move LDAP user attributes "sync" to background (except for ajax jobs)Arthur Schiwon2017-11-091-2/+4
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #5568 from nextcloud/ldap-agent-credentials-safeLukas Reschke2017-11-091-1/+1
|\ | | | | Ldap agent credentials save
| * Fix regression: undesired writes to the DBArthur Schiwon2017-10-271-1/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Update license headersMorris Jobke2017-11-061-1/+5
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | avoid unnecessary recursionArthur Schiwon2017-10-251-1/+1
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* and add missing whitespaces to log outoutArthur Schiwon2017-09-281-2/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* LDAP: Simplify conditions in establishConnectionJarkko Lehtoranta2017-07-231-9/+6
| | | | Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* LDAP: Use imported exception in Connection classJarkko Lehtoranta2017-07-231-4/+4
| | | | Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* LDAP: Clean-up doConnectJarkko Lehtoranta2017-07-231-11/+14
| | | | Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* LDAP: Throw an exception if disabling LDAP referrals failsJarkko Lehtoranta2017-07-231-0/+2
| | | | Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* LDAP: Throw an exception if Start TLS failsJarkko Lehtoranta2017-07-231-1/+3
| | | | | | | This ensures that only a secure connection to the LDAP server will be used, if Start TLS has been enabled. Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* LDAP: Remove unnecessary "recursion" fixJarkko Lehtoranta2017-07-231-7/+0
| | | | | | | This reverts commit 86d72b9a61f5e8a9b57c6f0bb431eb6722aa12a3 "LDAP: fix possible recursion". Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* LDAP: Don't handle invalid credentials as a connection errorJarkko Lehtoranta2017-07-231-2/+9
| | | | Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* LDAP: Connect to backup server only if it exists + handle errorsJarkko Lehtoranta2017-07-231-3/+7
| | | | Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
* user_ldap: Add support for gidNumberXuanwo2017-04-251-0/+6
| | | | | | | | | | | | This patch is based on the work of @dleeuw (https://github.com/dleeuw) (See https://github.com/nextcloud/server/issues/2640#issuecomment-269615883 for more details). The difference is user & group data will be written into cache to have better performance, and functions splited from primaryGroupID series to make them more readable. Fixed https://github.com/nextcloud/server/issues/2640 Signed-off-by: Xuanwo <xuanwo@yunify.com>
* add integration test for uuid attr detectionArthur Schiwon2017-02-171-0/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update uuidAttributes list to include FreeIPA's ipauniqueidBrent Bloxam2017-02-101-1/+1
| | | | Signed-off-by: Brent Bloxam <brent.bloxam@gmail.com>