aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User/User.php
Commit message (Collapse)AuthorAgeFilesLines
* Refactor `OC\Server::getCommentsManager`Andrew Summers2024-03-151-2/+3
| | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-5/+5
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Merge pull request #40114 from summersab/refactor/OC-Server-getAvatarManagerArthur Schiwon2023-11-221-1/+1
|\ | | | | Refactor `OC\Server::getAvatarManager`
| * Refactor `OC\Server::getAvatarManagerAndrew Summers2023-09-011-1/+1
| | | | | | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* | Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_privateRobin Appelman2023-09-211-1/+1
|\ \ | |/ |/| Refactor "substr" calls in lib/private to improve code readability
| * Refactor "substr" calls to improve code readabilityHamid Dehnavi2023-07-071-1/+1
| | | | | | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* | fix!: Remove symfony EventDispatcherInterface from UserJoas Schilling2023-07-271-21/+8
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | fix!: Remove User events which have a typed event replacementJoas Schilling2023-07-271-4/+0
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* chore: Replace \OC::$server->query with \OCP\Server::get in /libChristoph Wurst2023-07-061-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #34443 from nextcloud/feat/add-enabled-user-backendCôme Chilliet2023-07-031-9/+31
|\ | | | | Add IProvideEnabledStateBackend interface
| * Fix since annotations and add boolean return type for setUserEnabledCôme Chilliet2023-06-201-3/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Fix user tests, avoid setting enabled state to the same valueCôme Chilliet2023-05-231-3/+4
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Add user enabled state backend featureCôme Chilliet2023-05-231-9/+30
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_privateRobin Appelman2023-06-011-1/+1
|\ \ | | | | | | Refactors "strpos" calls in lib/private to improve code readability.
| * | Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-1/+1
| |/ | | | | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* / fix(dav): Fix avatar size in system address bookJoas Schilling2023-05-261-1/+1
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat(users): Store and load a user's managerChristoph Wurst2023-05-121-0/+25
| | | | | Co-Authored-By: hamza221 <hamzamahjoubi221@gmail.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(user): Can change display nameChristopher Ng2023-05-041-1/+1
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Recalculate storage statistics on updating the quotaJulius Härtl2023-03-061-0/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix setQuota on User on 32bitsCôme Chilliet2023-02-071-2/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* 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-011-0/+3
|\ \ | |/ |/| Fix creation of new user and display the correct error message
| * Fix creation of new user and display the correct error messageChristopher Ng2022-08-221-0/+3
| | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | filter index.php from cloudIdMaxence Lange2022-08-311-0/+3
|/ | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* only update last login timestamp with minute percisionRobin Appelman2022-07-201-4/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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-201-10/+21
| | | | | | | | | | | | | - 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>
* 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>
* Delay loading user preferences until we need themJoas Schilling2022-02-281-8/+12
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* enable the user to set a primary (notification) email address (backend)Arthur Schiwon2021-09-091-11/+66
| | | | | | | - specific getters and setters on IUser and implementation - new notify_email field in provisioning API Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* 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>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-3/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* better cleanup of user files on user deletionRobin Appelman2021-04-271-13/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix RedundantPropertyInitializationCheckRoeland Jago Douma2021-03-091-2/+2
| | | | | | For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Streamline user creation and deletion eventsMorris Jobke2020-11-231-0/+8
| | | | | | CreateUserEvent was the only one that didn't matched the naming scheme of BeforePASTTENSEEvent and PASTTENSEEvent. The event wasn't used at all so this just removes it again as there is BeforeUserCreatedEvent that is also available since 18. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add event to allow apps to overwrite user quotaRobin Appelman2020-09-171-1/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* User.php: rename of old dispatcher to legacyDispatcherMorris Jobke2020-07-301-11/+11
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Migrate OC_Group post_removeFromGroup hook to actual event objectMorris Jobke2020-07-301-2/+10
| | | | | | | | Ref #14552 This adds a BeforeUserRemovedEvent to the LDAP backend because it was missing. It's not really before, but we don't have the before state. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Delete avatar if a user is deletedJulius Härtl2020-04-241-0/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-7/+7
| | | | | | | | | | | | | | | 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>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>