Marcel Klehr
7f5b61c66d
Update apps/user_ldap/lib/User/User.php
...
Co-authored-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-09-29 13:48:06 +07:00
Marcel Klehr
66f6e94d7d
LDAP: Increase profile picture limit to 512
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-09-29 12:47:48 +07:00
Côme Chilliet
7a59d2ec07
Remove deprectated ILogger uses from user_ldap application
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-19 15:22:45 +07:00
Arthur Schiwon
4054a7ddc8
fix(LDAP): add return type hint and description
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-07-07 10:46:00 +07:00
Arthur Schiwon
92a082d823
fix(ldap): avatar is not being fetched
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-07-05 17:13:43 +07:00
Faraz Samapoor
b0938b9083
Refactors "strpos" calls in /apps/user_ldap to improve code readability.
...
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-02 15:26:55 +07:00
Marc Hefter
621c6c3c56
code styling
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@march42.net>
2023-04-24 10:21:45 +07:00
Marc Hefter
aa210365ec
Update apps/user_ldap/lib/User/User.php
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@march42.net>
2023-04-24 10:14:17 +07:00
Marc Hefter
e83520617d
removed profile data from LDAP will get removed
...
If attribute mapping is configured and no value present in LDAP, the
according profile field is emptied. Removing an attribute e.g. phone
from LDAP will cause the phone number being removed from profile.
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-21 10:35:44 +07:00
Marc Hefter
64914593a0
optimized handling of user profile data change
...
Check profile data checksum before updating user profile, to ensure
data has changed. Write checksum to user settings and cache.
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-14 11:08:46 +07:00
Marc Hefter
eec5e702da
error handling in update profile from LDAP
...
added error message on InvalidArgumentException
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-11 16:40:00 +07:00
Marc Hefter
ebb0c53f9e
trying to make github-code-scanning bot happy
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:31 +07:00
Marc Hefter
72d0a3f26e
added simple data conversion for LDAP attributes
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:31 +07:00
Marc Hefter
1e7bc93ec8
handling, formatting of postalAddress attribute syntax
...
replace '$' with ', ' delimiter for address property
reformatted some code to 80 column
early check and return, if wasRefreshed('profile')
removed FIXMEs after digging and double checking
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:30 +07:00
Marc Hefter
5ea46d81bb
nice up the code handling AccountManager
...
merging defaultScopes from DEFAULT_SCOPES and account_manager.default_property_scope
removing unneccessary profileScope setting (using config.php instead)
honoring admin choice 'profile.enabled'=>false in config.php
moved checking for empty array to updateProfile function
corrected some typos and cleaned some comments
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:30 +07:00
Marc Hefter
dd2bd6a925
refined code, to be independend from OCP\IUser
...
rework updateProfile in user_ldap/lib/User/User.php
some cleanup at processAttributes in user_ldap/lib/User/User.php
rearranged Fediverse attribute, to match profile layout
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:29 +07:00
Marc Hefter
c6408587ed
fixing Psalm messages
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:28 +07:00
Marc Hefter
f812b87576
handling updateProfile with array of values
...
using an array to buffer profile updates, like suggested by @come-nc
clean some code and remove unneccessary redundancy
added the Fediverse profile property
Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:28 +07:00
Marc Hefter
5c4a05cfd6
CleanUp: removed redundant storing profile attributes in user settings
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:27 +07:00
Marc Hefter
3020290751
CleanUp: removed redundant condition if block
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:27 +07:00
Marc Hefter
2f76b7a3d5
CleanUp: tidy checking for empty profileScope
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:26 +07:00
Marc Hefter
44065c0fea
Fix: Parameter $scope has no provided type
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:25 +07:00
Marc Hefter
26aa1c3580
CleanUp: remove unneeded UNSET, to unclutter code
...
Signed-off-by: march42 <marchefter@gmail.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:25 +07:00
Marc Hefter
240c57b94b
cleanup: removed unnecessary imports of IAccountManager, AccountManager, IDBConnection
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:24 +07:00
Marc Hefter
b72fbd58f6
fixed error: Array to string conversion at user_ldap/lib/User/User.php#639
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:23 +07:00
Marc Hefter
c7623c7869
bugfix: changed forgotten userName, to getUsername
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:22 +07:00
Marc Hefter
eee0275dc5
added user profile scope setting
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:22 +07:00
Marc Hefter
2315c17726
feature addition: [user_ldap] update user profile from LDAP
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:21 +07:00
Marc Hefter
7fa3c674de
feature addition: [user_ldap] update user profile from LDAP; WIP; fixing some uggly copy-and-paste errors; testing functionality; preparing and editing the documentation
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:20 +07:00
Marc Hefter
404d26aa4a
feature addition: [user_ldap] update user profile from LDAP; WIP work-in-progress; TODO update profile
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
2023-04-06 08:19:39 +07:00
jld3103
d9f8522003
Fix types for reading and writing config values
...
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-04-05 09:08:56 +07:00
Côme Chilliet
dab5ea958a
Fix unit tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-03 16:35:06 +07:00
Côme Chilliet
f3dcbfe146
Fix PHP 8.1 support for user_ldap application
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:43:30 +07:00
Côme Chilliet
7ac895e766
Move back logger to protected in OCA\User_LDAP\User\User
...
It was changed to private because of a bad copy/paste.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 11:06:14 +07:00
Côme Chilliet
6b960de47c
Get rid of LogWrapper calling deprecated logger and use LoggerInterface from PSR instead
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-09 15:11:15 +07:00
Arthur Schiwon
27865d03c0
use specific email getter where necessary
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-09 19:23:05 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Arthur Schiwon
699871dcb0
these code bits were part of old logic that was already refactored out
...
- only references were in unit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-09-04 12:56:43 +07:00
Arthur Schiwon
84619a5b9c
use serverControls directly with LDAP calls, fixes 19127
...
- adapters for PHP API version to Support PHP < 7.3
- switch to pass only one base per search
- cookie logic is moved from Access to API adapters
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-04-14 12:58:28 +07:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
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>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
44577e4345
Remove trailing and in between spaces
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +07:00
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +07:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Philipp Staiger
8769d97f62
single squashed commit for bug fix
...
Signed-off-by: Philipp Staiger <philipp@staiger.it>
2020-03-26 09:01:35 +07:00
Arthur Schiwon
5cae135b94
decouple userExists from userExistsOnLDAP check
...
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>
2020-01-08 09:21:22 +07:00