aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/User
Commit message (Collapse)AuthorAgeFilesLines
...
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-091-0/+1
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-084-76/+76
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-262-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-253-156/+156
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix recursive calls in logging via server methodsJoas Schilling2020-03-181-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move deprecated aliases over to new registrationRoeland Jago Douma2020-03-151-2/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add typed create user eventsChristoph Wurst2019-12-032-57/+73
| | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-274-28/+28
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-275-6/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add typed events for password_policyChristoph Wurst2019-11-271-13/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-222-2/+2
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix the tests after #18029Roeland Jago Douma2019-11-211-2/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make the post login event publicChristoph Wurst2019-11-201-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make renewSessionToken return the new tokenRoeland Jago Douma2019-10-091-10/+9
| | | | | | | Avoids directly getting the token again. We just inserted it so it and have all the info. So that query is just a waste. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update testsRoeland Jago Douma2019-07-291-44/+71
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* lib/private/User: do not change user properties if value has not changedLeon Klingele2019-04-111-16/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-014-76/+94
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use a case insensitive search for emailRoeland Jago Douma2018-12-201-2/+3
| | | | | | | | Fixes #7084 Now entering wrongly cased email (roeland@ instead of Roeland@) for password reset etc. Will also work. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* filter null values for UserManager::getByEmailGeorg Ehrke2018-10-151-0/+33
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Add testsRoeland Jago Douma2018-10-021-0/+57
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mark token as invalid if the password doesn't matchRoeland Jago Douma2018-10-021-4/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Added case example to testsJohn Molakvoæ (skjnldsv)2018-05-261-2/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix session testsRoeland Jago Douma2018-05-151-2/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fixed testsJohn Molakvoæ (skjnldsv)2018-04-091-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #7419 from Abijeet/feature-7175Morris Jobke2018-03-062-2/+46
|\ | | | | Fixes #7175 - Allow to search for email address in user management
| * refactor user searchingRobin Appelman2017-12-202-4/+23
| | | | | | | | | | | | add additional user searching tests Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Adds search by email function on the users screen.Abijeet2017-12-161-0/+25
| | | | | | | | | | | | | | | | | | | | | | Fixes #7175. - Updated the query to fetch the users in users > everyone tab. - Updated the query to fetch the users in users > admin tab. - Tested to ensure that the disabled users are also being fetched. - Added test cases. Signed-off-by: Abijeet <abijeetpatro@gmail.com>
* | Merge pull request #8036 from nextcloud/phpunit6Roeland Jago Douma2018-01-251-1/+1
|\ \ | | | | | | Require PHPUnit 6.5 or higher
| * | Fix "Undefined method setExpectedException()"Joas Schilling2018-01-241-1/+1
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Fix testsRoeland Jago Douma2018-01-231-45/+50
|/ / | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | never translate login names when requiring with a user idArthur Schiwon2018-01-031-12/+28
| | | | | | | | | | | | where appropriate, the preLoginNameUsedAsUserName hook should be thrown. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | extend tests for status quoArthur Schiwon2018-01-031-0/+12
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Use ::class in test mocksMorris Jobke2017-10-243-6/+6
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Prevent SQL error message in case of errorLukas Reschke2017-08-171-1/+20
| | | | | | | | | | | | | | `\OC\User\Database::createUser` can throw a PHP exception in case the UID is longer than permitted in the database. This is against it's PHPDocs and we should cast this to `false`, so that the regular error handling triggers in. The easiest way to reproduce is on MySQL: 1. Create user `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in admin panel 2. Create user `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in admin panel again 3. See SQL exception as error message Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix SessionTestRoeland Jago Douma2017-08-091-0/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* emit changeUser only if there really was a change (quota, displayname)Arthur Schiwon2017-06-011-1/+95
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Adjust token nameLukas Reschke2017-05-181-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* UserManager can now count disabled usersArthur Schiwon2017-04-291-0/+25
| | | | | | Users page takes advantage of that Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Use the new method in the old one to remove duplicate codeJoas Schilling2017-04-271-5/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Trigger change when a user is enabled/disabledJoas Schilling2017-04-251-1/+49
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use the correct Dummy and Backend classJoas Schilling2017-04-201-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Better validation of allowed user namesJoas Schilling2017-04-181-0/+43
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Save the scope of an auth token in the sessionRobin Appelman2017-04-051-29/+36
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add tests for database user backend cachingVincent Petry2017-03-201-1/+18
| | | | | | | | Add comment, closeCursor in user DB query Invalidate user in cache after successful creation Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix testsJoas Schilling2017-01-051-1/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Get user home folder before deletionVincent Petry2016-12-231-0/+32
| | | | | | | After the deletion getHome() will fail because the user doesn't exist any more, so we need to fetch that value earlier. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Improve OC\User\User coverageRoeland Jago Douma2016-12-201-49/+204
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Set last-login-check on basic authRoeland Jago Douma2016-12-051-0/+101
| | | | | | | | | Else the last-login-check fails hard because the session value is not set and thus defaults to 0. * Started with tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* fix parameter orderChristoph Wurst2016-11-281-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* do not remember session tokens by defaultChristoph Wurst2016-11-271-3/+43
| | | | | | | | We have to respect the value of the remember-me checkbox. Due to an error in the source code the default value for the session token was to remember it. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>