aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix avatar cleanup on user deleteJoas Schilling2022-09-191-5/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #34073 from nextcloud/login-email-filterVincent Petry2022-09-161-0/+3
|\ | | | | dont try email login if the provider username is not a valid email
| * dont try email login if the provider username is not a valid emailRobin Appelman2022-09-141-0/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #33793 from nextcloud/fix/noid/rtrim-cloud-idMaxence Lange2022-09-151-2/+2
|\ \ | |/ |/| rtrim cloudId url earlier
| * rtrim url earlierMaxence Lange2022-09-011-2/+2
| | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* | I dug into it again, and the issue is much simpler than I previously though.Louis Chemineau2022-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | - LDAP has an email address with capital letters - NC store this address in lower case - When the user logs in, we compare the [stored email with the new lower case email](https://github.com/nextcloud/server/blob/master/lib/private/AllConfig.php#L259-L261) before storing it. Here, both email will be the same, so we won't store the new email address with upper case letters. Which is what we want. - We then [compare emails as they are before triggering an event](https://github.com/nextcloud/server/blob/master/lib/private/User/User.php#L202-L204), they won't match, so the user will receive an email signaling an email change every time he logs in. The fix is to compare the old email with the new lower case email before sending the event. Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Merge pull request #33625 from nextcloud/fix/33572/add-userVincent Petry2022-09-012-1/+6
|\ \ | |/ |/| Fix creation of new user and display the correct error message
| * Fix creation of new user and display the correct error messageChristopher Ng2022-08-222-1/+6
| | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | Merge pull request #33780 from nextcloud/enh/noid/cloud-id-cliblizzz2022-09-011-0/+3
|\ \ | | | | | | filter index.php from cloudId
| * | filter index.php from cloudIdMaxence Lange2022-08-311-0/+3
| |/ | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* / Log if cookie login failed with token mismatch or session unavailabilityChristoph Wurst2022-08-311-0/+8
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make DisplayNameCache return null if user doesn't existsCarl Schwan2022-08-163-4/+4
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge branch 'master' into display-name-cache-publicCarl Schwan2022-08-157-42/+186
|\ | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * only update last login timestamp with minute percisionRobin Appelman2022-07-201-4/+9
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Move CappedMemoryCache to OCPCarl Schwan2022-07-141-1/+1
| | | | | | | | | | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Merge pull request #32973 from nextcloud/cleanup/avatar-codeCarl Schwan2022-07-112-0/+127
| |\ | | | | | | Cleanup avatar related code
| | * Make Color class publicCarl Schwan2022-07-052-4/+6
| | | | | | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| | * Cleanup avatar related codeCarl Schwan2022-06-222-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | - Move event listener to new event handling - Add typing almost everywhere - Fix inconsistent interface parameter Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * | Do not save invalid display name to the databaseChristopher Ng2022-06-281-0/+4
| |/ | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
| * Keep non default protocol in cloud idJoas Schilling2022-06-091-7/+1
| | | | | | | | | | | | | | | | | | When there is no protocol on the cloud id, we assume it's https:// But this means that when an http:// server currently sends an OCM invite to another server, the protocol is striped and the remote instance will try to talk back to https:// which might not be available. Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Fix psalm issues related to the user backendCarl Schwan2022-05-205-31/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | - Reflect the actual return value returned by the implementation in the the interface. E.g. IUser|bool -> IUser|false - Remove $hasLoggedIn parameter from private countUser implementation. Replace the two call with the equivalent countSeenUser - getBackend is nuallable, add this to the interface - Use backend interface to make psalm happy about call to undefined methods. Also helps with getting rid at some point of the old implementActions Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | expose displayname cache trough a public interfaceRobin Appelman2022-05-182-4/+13
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Do not dispatch postSetPassword when setPassword failsLouis Chemineau2022-05-051-6/+10
| | | | | | Also Improve error message when setPassword fails Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #32082 from nextcloud/directory-content-lazy-ownerVincent Petry2022-04-251-0/+149
|\ | | | | use a lazy user for the file owner when listing a directory
| * Use a lazy user for the file owner when listing a directoryRobin Appelman2022-04-221-0/+149
| | | | | | | | | | | | | | Only getUID and getDisplayName are called on the file owner objects anyway and we can get this information often without DB request Signed-off-by: Robin Appelman <robin@icewind.nl>
* | cache display names in local memory before external memcacheRobin Appelman2022-04-221-6/+14
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update cache when display name changeCarl Schwan2022-04-221-1/+12
| | | | | | This improve the correctness of the data Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Cache display nameCarl Schwan2022-04-221-0/+66
| | | | | | | | This should saves some query in the share backend when displaying the owner and it's not important if the display name is 10 minutes outdated as it is very rare that this gets changed. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-18/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #31218 from ↵Joas Schilling2022-03-021-18/+13
|\ | | | | | | | | nextcloud/techdebt/noid/use-cache-also-for-userbackend-getpassword Use the cache also for UserBackend::getPassword
| * Update cache when setting the passwordJoas Schilling2022-02-181-1/+7
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Use the cache also for UserBackend::getPasswordJoas Schilling2022-02-161-17/+6
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Delay loading user preferences until we need themJoas Schilling2022-02-281-8/+12
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Only setupFS when we have to copy the skeletonJoas Schilling2022-02-251-4/+4
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update Session.phpMarek-Wojtowicz2022-01-121-1/+1
| | | | | | The http headers according to rfc 2616 is iso-8859-1. This patch fixes the behavior when non-ascii characters are present in the header. Signed-off-by: Marek Wójtowicz <Marek.Wojtowicz@agh.edu.pl>
* Don't check the configvalue for lastLogin which is never nullJoas Schilling2021-12-101-2/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove default token which is deprecated since Nextcloud 13Joas Schilling2021-12-011-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix type errorsCôme Chilliet2021-11-231-4/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix missing token updateJoas Schilling2021-11-121-0/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fair use of push notificationsJoas Schilling2021-10-231-1/+6
| | | | | | | | | We want to keep offering our push notification service for free, but large users overload our infrastructure. For this reason we have to rate-limit the use of push notifications. If you need this feature, consider setting up your own push server or using Nextcloud Enterprise. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use cached user backend info for password loginJoas Schilling2021-09-141-3/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* enable the user to set a primary (notification) email address (backend)Arthur Schiwon2021-09-092-11/+67
| | | | | | | - specific getters and setters on IUser and implementation - new notify_email field in provisioning API Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #28481 from nextcloud/fix/hash-keyJulius Härtl2021-08-181-2/+3
|\ | | | | Hash cache key
| * Hash cache keyChristopher Ng2021-08-171-2/+3
| | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | Emit an error log when the app token login name does not matchChristoph Wurst2021-08-131-1/+6
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* refs #21045 add app config to disable unlimited quota and to set max quotaJulien Veyssier2021-07-291-0/+12
| | | | | | | | | avoid unlimited quota as default_quota fallback value if unlimited quota is not allowed avoid getting/setting/displaying unlimited default quota if not allowed implement tests for unlimited quota restrictions Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
* Directly return cloud id from userJulius Härtl2021-07-141-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Migrate HintException to OCPGary Kim2021-06-301-1/+1
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-047-24/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #26792 from nextcloud/user-delete-cleanup-filesJohn Molakvoæ2021-06-021-13/+0
|\ | | | | better cleanup of user files on user deletion