diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-03-23 01:49:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 01:49:36 +0300 |
commit | 93f5717c03170975b3bd3925dbc16f77dc9b3327 (patch) | |
tree | 01b869aa3ed235f1488a07282ba4d23f45b78812 /plugins | |
parent | 0eb8c7c08676e50c955fd2e1081b490a62026a59 (diff) |
Remove user alias from DB (#15714)
* Remove alias
* fix more tests
* fix more system tests
* fix ui tests
* add to developer changelog
* fix typo
Diffstat (limited to 'plugins')
59 files changed, 223 insertions, 357 deletions
diff --git a/plugins/CoreHome/templates/_topBar.twig b/plugins/CoreHome/templates/_topBar.twig index c53ce95577..5a8acade30 100644 --- a/plugins/CoreHome/templates/_topBar.twig +++ b/plugins/CoreHome/templates/_topBar.twig @@ -1,4 +1,4 @@ -{{ postEvent("Template.beforeTopBar", userAlias, userLogin, topMenu) }} +{{ postEvent("Template.beforeTopBar", userLogin, topMenu) }} <ul class="right hide-on-med-and-down"> {% macro menuItemLabel(label, icon) %} {% if icon is defined and icon and icon starts with 'icon-' %} diff --git a/plugins/Dashboard/javascripts/dashboard.js b/plugins/Dashboard/javascripts/dashboard.js index e839d74c2c..9c43667756 100644 --- a/plugins/Dashboard/javascripts/dashboard.js +++ b/plugins/Dashboard/javascripts/dashboard.js @@ -114,7 +114,7 @@ function copyDashboardToUser() { $.each(availableUsers, function (index, user) { if (user.login != 'anonymous' && user.login != piwik.userLogin) { $(makeSelectorLastId('copyDashboardUser')).append( - $('<option></option>').val(user.login).text(user.login + ' (' + user.alias + ')') + $('<option></option>').val(user.login).text(user.login) ); } }); diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_create_new.png b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_create_new.png index e7e03cfe7b..ef0c4dfaac 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_create_new.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_create_new.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ceba2add6b8d6537ed128ad8930a48e10fdf701551bf6d51f98aaa60d91fd705 -size 317218 +oid sha256:e54dada35ac399337669eaa9fdda0d52e185859568b2d2955ad7062e574ccab7 +size 317260 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_expanded.png b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_expanded.png index 807855b89b..747d8aad81 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_expanded.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_expanded.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b614eaac72f9867c6809786e6b353021b08accd1ec0f9fed685625ae517a1cc -size 53012 +oid sha256:39f7b2d83db732b8b71d0381a3a88e7d323fc5a31f398d34b619724330c3347d +size 53007 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_removed.png b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_removed.png index 495f3364a1..523a8554da 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_removed.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_removed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e7d11d9f51bac358db2dfeac828152783669794626099bd8ef15012e6a104e8 -size 471855 +oid sha256:03a9e8f47ea8c7ff3ecbb3e065ab9e7dbd11001f82af10bae193b88c3a89d90d +size 471874 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_list_shown.png b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_list_shown.png index 1df3f81cc4..d6f717d8c3 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_list_shown.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_list_shown.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:915d175062ff0ce2d6105a3f7b10613ae89d84398915ebb3383bfb26acc88b31 -size 66569 +oid sha256:a7897dd6d5c69d74bc6c638db3a2b1f5a63dea336545fba7ca1f0f7a7e828887 +size 66566 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_preview.png b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_preview.png index af0139a06b..88b743ef24 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_preview.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_widget_preview.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d171c1f25f9e6c3d563d28e888a071e5aece8d16522d9e92a26189d1ac03baf -size 78152 +oid sha256:74696ee8213161e0e0106b699a8fb04cd6dfd97a5324360398108d3fb076ae11 +size 78140 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_change_layout.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_change_layout.png index 6f2b2ea43d..d4b0035ccb 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_change_layout.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_change_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:734430cec12f1a1d50fdba2233767cce8b23a884390c363ca5b1900078256c46 -size 28347 +oid sha256:7477a951f1124b9e062b27375e989f498c6ae32bab28c58543ddf2a40bd0313f +size 28502 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_copied.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_copied.png index 69e5d2e373..473a7931f0 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_copied.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_copied.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0abd087f4d36f11bab023eaac6fcf4c4f0466400f5a144f913d2c7c2551ec927 -size 29501 +oid sha256:621d4b6f38b63ef722d67e632cc0cf7323bdd7195ac5049a3c959c37174027f2 +size 29669 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_create_new.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_create_new.png index cd862e0a79..5abc1d38b2 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_create_new.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_create_new.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:71aa611944407b45bc0327affe24edad35dde298d64589dfced48ac446309ebf -size 29659 +oid sha256:d441abc94be33cd791dbd536bd9032adad723dcadfaef5cfaa2fd5cdb64950e1 +size 29822 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_default_widget_selection_changed.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_default_widget_selection_changed.png index 4fab81b58b..9994bbcdfb 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_default_widget_selection_changed.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_default_widget_selection_changed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f27e517adceb88eb6b4a43e03309af013f31986ad90c424afaada6c1638392b0 -size 29010 +oid sha256:b5ce4eb70e5de0dbd49d580067cf559d4b19d02adcffc7954e10276a26ac48d4 +size 29111 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded.png index d5ad244c7c..dfaa8ec626 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:469bf405bc3cd4396f5a2ac8ea9a7ecf57446e88807ab1988a59947b0d6a017b -size 28577 +oid sha256:1c06f98b746031bec6b656eba7111fc0ece7da9c1f94eaab5eecf70dbec43e81 +size 28729 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png index 6fe4e3d7f2..dafef00e4d 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6efe14c359d8f3d1b4329fdb2e9538d7cc4d0c95cd4dc2fb90ab212e34440594 -size 715000 +oid sha256:9eb9f527b27d0b722443835ad347ee936095eb5be3cb7ecc60e68cfc93e04274 +size 715130 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_removed.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_removed.png index 6fe4e3d7f2..dafef00e4d 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_removed.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_removed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6efe14c359d8f3d1b4329fdb2e9538d7cc4d0c95cd4dc2fb90ab212e34440594 -size 715000 +oid sha256:9eb9f527b27d0b722443835ad347ee936095eb5be3cb7ecc60e68cfc93e04274 +size 715130 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_rename.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_rename.png index b58e73dd91..1877282422 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_rename.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_rename.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a19692edc4525595995dce157fb8e162fc87fe9984766ed8d7797036206ca48c -size 29011 +oid sha256:8aef50ccb3d3670ba06865b8cae0b5f6514e1c486726fa9927e1c0fff2859e02 +size 29111 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_reset.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_reset.png index 5e1d8961c9..c3f2c1f128 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_reset.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c826017ba202846f96d3b6c995d8d3c525d635975afec436baff38da7a8488e3 -size 378817 +oid sha256:88c8d45ddb799f6dd5e335a8e7f77c9cc1833e6b220186646af0e606c5d5c0ab +size 379027 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_segmented.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_segmented.png index 9b328e1a9d..21c8755d0a 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_segmented.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_segmented.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:171e0f85a9c19893127b98b84c8f92c986e77b0c829d3c41afb78063c8c4eee0 -size 31565 +oid sha256:349646954f6857c2771c9857f72921720648eac891502aa3f2a229f9e2994b59 +size 31445 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_add_widget.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_add_widget.png index dc13f8a405..efc31c7347 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_add_widget.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_add_widget.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d73e241d8356616b9f0f3f3e6487534c61fbc451a5da980c3441bc194839cf9 -size 205499 +oid sha256:0228589ba0c92489ad65ba1fc87ddcfe25b619c3127dfe9f7088f451066b40f8 +size 205698 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_maximise.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_maximise.png index 224a9bf21c..63708141c4 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_maximise.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_maximise.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:731057f7bf638d825c38f6f5428381f1e033c7e63e1be88b92dcaf6f0ac41fcd -size 31275 +oid sha256:368a75844ac282416ea0fb0f580c71aa0a4fca7f4f3e496563061b5a751f1c67 +size 31396 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_minimised.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_minimised.png index 0abbd52461..38a6a80f4f 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_minimised.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_minimised.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d12e8e73666dd1ac1db57e4c42b718ed5b869c136c8cbd4fdd552a458a3970b4 -size 22057 +oid sha256:bcca4b1b60c5563a10f9fa9a9835eaf32ea205948c929f897c976ac646f32de4 +size 22160 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move.png index b0f3916a22..bb8f1ab6dc 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c518984529c9147f79c4f8718dbca079a58cc6bf94fd0c90ff2bb9a5540c025 -size 28151 +oid sha256:889d6b6973739c5d61e7453f5f82aba8b095fe46a84428778af6cd5d02a96b11 +size 28299 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move_removed.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move_removed.png index 4bf82eadc5..cd480655d1 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move_removed.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_move_removed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:495f12fac4ec25587e2cfe72d95b28799c309486dd285c7e8e3fecb4e4c5a313 -size 28633 +oid sha256:614915f4ac0da83c0544140cb6ed7b9a6bd1ee11dbe1deac3a2f057b1d76fa75 +size 28788 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_refresh.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_refresh.png index 4bf82eadc5..cd480655d1 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_refresh.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_refresh.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:495f12fac4ec25587e2cfe72d95b28799c309486dd285c7e8e3fecb4e4c5a313 -size 28633 +oid sha256:614915f4ac0da83c0544140cb6ed7b9a6bd1ee11dbe1deac3a2f057b1d76fa75 +size 28788 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unmaximise.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unmaximise.png index a18864910a..3ae0f9312e 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unmaximise.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unmaximise.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d7aec7a34f19fe0a63126e7426b7cefe42d3ae3a7f71f176b0254e027acdad8c -size 30244 +oid sha256:a129dfe92be5b42432f4266804f78a1ef9b411fb3757166ef4206b470906cd20 +size 30395 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unminimise.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unminimise.png index 4bf82eadc5..cd480655d1 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unminimise.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_unminimise.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:495f12fac4ec25587e2cfe72d95b28799c309486dd285c7e8e3fecb4e4c5a313 -size 28633 +oid sha256:614915f4ac0da83c0544140cb6ed7b9a6bd1ee11dbe1deac3a2f057b1d76fa75 +size 28788 diff --git a/plugins/Feedback/tests/Integration/ControllerTest.php b/plugins/Feedback/tests/Integration/ControllerTest.php index acd95512e3..67f41da8d9 100644 --- a/plugins/Feedback/tests/Integration/ControllerTest.php +++ b/plugins/Feedback/tests/Integration/ControllerTest.php @@ -36,8 +36,6 @@ class ControllerTest extends IntegrationTestCase 'user1', 'a98732d98732', 'user1@example.com', - 'user1', - 'ab9879dc23876f19', '2019-03-03' ); FakeAccess::$identity = 'user1'; diff --git a/plugins/Feedback/tests/Integration/FeedbackTest.php b/plugins/Feedback/tests/Integration/FeedbackTest.php index 33c88e1336..f044592a84 100644 --- a/plugins/Feedback/tests/Integration/FeedbackTest.php +++ b/plugins/Feedback/tests/Integration/FeedbackTest.php @@ -35,10 +35,9 @@ class FeedbackTest extends IntegrationTestCase $this->userModel = new Model(); $this->userModel->addUser( - 'user1', + 'user1', 'a98732d98732', 'user1@example.com', - 'user1', '2019-03-03' ); FakeAccess::$identity = 'user1'; diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png index 2f878b8817..fe6a877fd3 100644 --- a/plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png +++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0b21a3742b3cac4b569ab60cfdd0d52aff04894d3db3c1082803adc76b2cefc -size 188859 +oid sha256:10b733e5ce0d6a00109123dc4a14fbecd30b32b53bf9d6a1c1150153953d673b +size 188886 diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php index 00897b5d70..618db8f86b 100644 --- a/plugins/Login/Auth.php +++ b/plugins/Login/Auth.php @@ -87,7 +87,7 @@ class Auth implements \Piwik\Auth if ($this->passwordHelper->needsRehash($user['password'])) { $newPasswordHash = $this->passwordHelper->hash($passwordHash); - $this->userModel->updateUser($login, $newPasswordHash, $user['email'], $user['alias']); + $this->userModel->updateUser($login, $newPasswordHash, $user['email']); } $this->token_auth = null; // make sure to generate a random token diff --git a/plugins/Login/PasswordResetter.php b/plugins/Login/PasswordResetter.php index f1e73cfeee..e4800e7a93 100644 --- a/plugins/Login/PasswordResetter.php +++ b/plugins/Login/PasswordResetter.php @@ -230,7 +230,12 @@ class PasswordResetter $usersManager = $this->usersManagerApi; Access::doAsSuperUser(function () use ($usersManager, $user, $resetPassword) { $userUpdater = new UserUpdater(); - $userUpdater->updateUserWithoutCurrentPassword($user['login'], $resetPassword, $email = false, $alias = false, $isPasswordHashed = true); + $userUpdater->updateUserWithoutCurrentPassword( + $user['login'], + $resetPassword, + $email = false, + $isPasswordHashed = true + ); }); } diff --git a/plugins/Login/tests/Integration/LoginTest.php b/plugins/Login/tests/Integration/LoginTest.php index 8a45a53096..7e42fb442d 100644 --- a/plugins/Login/tests/Integration/LoginTest.php +++ b/plugins/Login/tests/Integration/LoginTest.php @@ -347,10 +347,9 @@ class LoginTest extends IntegrationTestCase $user = array('login' => 'user', 'password' => 'geqgeagae', 'email' => 'test@test.com', - 'alias' => 'alias', 'superuser_access' => 0); - API::getInstance()->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + API::getInstance()->addUser($user['login'], $user['password'], $user['email']); $model = new \Piwik\Plugins\UsersManager\Model(); $tokenAuth = $model->generateRandomTokenAuth(); diff --git a/plugins/ScheduledReports/ReportEmailGenerator.php b/plugins/ScheduledReports/ReportEmailGenerator.php index 6bdae922c3..c6aa18a885 100644 --- a/plugins/ScheduledReports/ReportEmailGenerator.php +++ b/plugins/ScheduledReports/ReportEmailGenerator.php @@ -22,7 +22,7 @@ abstract class ReportEmailGenerator $mail->setSubject($report->getReportDescription()); if (!empty($customReplyTo)) { - $mail->setReplyTo($customReplyTo['email'], $customReplyTo['alias']); + $mail->setReplyTo($customReplyTo['email'], $customReplyTo['login']); } $this->configureEmail($mail, $report); diff --git a/plugins/ScheduledReports/tests/Integration/ReportEmailGeneratorTest.php b/plugins/ScheduledReports/tests/Integration/ReportEmailGeneratorTest.php index 510ad74931..72d557c265 100644 --- a/plugins/ScheduledReports/tests/Integration/ReportEmailGeneratorTest.php +++ b/plugins/ScheduledReports/tests/Integration/ReportEmailGeneratorTest.php @@ -114,7 +114,7 @@ Content-Disposition: inline; filename="file2.txt" $mail = $this->testInstance->makeEmail($generatedReport, [ 'email' => 'test@testytesterson.com', - 'alias' => 'test person', + 'login' => 'test person', ]); $this->assertEquals('General_Report report - pretty date', $mail->getSubject()); diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png index c7e28dd23a..93768f9555 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94ed357dba4c01adf66d7ee817b58f48c5ee5e19773de488586e7cf1948f2c85 -size 15404 +oid sha256:94c758df25b81c46384bf9e6e76a6afe7998f16153622d674160a5e797437995 +size 15389 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png index 5a5738728a..227d3d687d 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f66eadc18cabe2ab949202870e5634adb1626d4795e097e7bae494a51482fa46 -size 38290 +oid sha256:ff4a9b1e02ce8e3611216673ddb81fc34ce1c6b3a1e8d639b289c00bc0cab4ee +size 38304 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png index ace95491c0..32806ae4dc 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a00d2064456331b08a34f9882fe7036c5a18de7d71c59459d476e26dea21ecfe -size 38932 +oid sha256:642779df775c3e9c7d4da17a55a0a8447abdd9f9845cb6872b106faa1fdbe6d1 +size 38914 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png index f8e5c26bb7..b1f7f01ac4 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ece6a7b3193bed1054ea71c748d0943e7a863b56d645b013be20179ca9fbfe4 -size 45165 +oid sha256:bc68e606e48b0e052e28ae98df7c8e2f9c4112596f5df355ef267dfe7e233e86 +size 45169 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png index 0359bfe896..05ff1e2a4f 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bce4029595c93ff47e0c26457f4857a9c8a42e4e70d2537bee361a49854e204 -size 136080 +oid sha256:ce01f9ce99add3c5e2e5bcca7a74da809b69071138687eeb6d1687eb9ac0400d +size 136067 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png index 1e7dddd9dd..90e31ca136 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ddc2c7da46342c738ab78be5cf55a85b7afe1dc3232e16d159b3602f62a67bc -size 17090 +oid sha256:9a0c69f7d2d8cfef951e990d43c52d05ee4dfdc2173a95555d713bcd27568ef2 +size 17080 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png index 856bc1dd54..e1ae7ee095 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2726e5cac039297dd41cc00ab853df5d216fb05aa9f34638e6e731b26b5e04db -size 17434 +oid sha256:6a05bd11872efa074aea60c40be98160a86f65bf414398db9fcc21127b07d336 +size 17428 diff --git a/plugins/SitesManager/tests/Integration/ApiTest.php b/plugins/SitesManager/tests/Integration/ApiTest.php index 1385cef121..f4c1b75386 100644 --- a/plugins/SitesManager/tests/Integration/ApiTest.php +++ b/plugins/SitesManager/tests/Integration/ApiTest.php @@ -1181,7 +1181,7 @@ class ApiTest extends IntegrationTestCase { API::getInstance()->addSite("site1", array("https://piwik.org", "http://example.com", "fb://special-url")); - APIUsersManager::getInstance()->addUser("user1", "geqgegagae", "tegst@tesgt.com", "alias"); + APIUsersManager::getInstance()->addUser("user1", "geqgegagae", "tegst@tesgt.com"); APIUsersManager::getInstance()->setUserAccess("user1", "view", array(1)); // Make sure we're not Super user @@ -1225,14 +1225,14 @@ class ApiTest extends IntegrationTestCase API::getInstance()->addSite("site2", array("http://piwik.com", "http://piwik.net")); API::getInstance()->addSite("site3", array("http://piwik.com", "http://piwik.org")); - APIUsersManager::getInstance()->addUser("user1", "geqgegagae", "tegst@tesgt.com", "alias"); + APIUsersManager::getInstance()->addUser("user1", "geqgegagae", "tegst@tesgt.com"); APIUsersManager::getInstance()->setUserAccess("user1", "view", array(1)); - APIUsersManager::getInstance()->addUser("user2", "geqgegagae", "tegst2@tesgt.com", "alias"); + APIUsersManager::getInstance()->addUser("user2", "geqgegagae", "tegst2@tesgt.com"); APIUsersManager::getInstance()->setUserAccess("user2", "view", array(1)); APIUsersManager::getInstance()->setUserAccess("user2", "admin", array(3)); - APIUsersManager::getInstance()->addUser("user3", "geqgegagae", "tegst3@tesgt.com", "alias"); + APIUsersManager::getInstance()->addUser("user3", "geqgegagae", "tegst3@tesgt.com"); APIUsersManager::getInstance()->setUserAccess("user3", "view", array(1, 2)); APIUsersManager::getInstance()->setUserAccess("user3", "admin", array(3)); diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php index c2d4dba6aa..d04efc19f7 100644 --- a/plugins/UsersManager/API.php +++ b/plugins/UsersManager/API.php @@ -291,7 +291,7 @@ class API extends \Piwik\Plugin\API * @param int $idSite * @param int|null $limit * @param int|null $offset - * @param string|null $filter_search text to search for in the user's login, email and alias (if any) + * @param string|null $filter_search text to search for in the user's login and email (if any) * @param string|null $filter_access only select users with this access to $idSite. can be 'noaccess', 'some', 'view', 'admin', 'superuser' * Filtering by 'superuser' is only allowed for other superusers. * @return array @@ -573,7 +573,7 @@ class API extends \Piwik\Plugin\API } /** - * Returns the user information (login, password hash, alias, email, date_registered, etc.) + * Returns the user information (login, password hash, email, date_registered, etc.) * * @param string $userLogin the user login * @@ -593,7 +593,7 @@ class API extends \Piwik\Plugin\API } /** - * Returns the user information (login, password hash, alias, email, date_registered, etc.) + * Returns the user information (login, password hash, email, date_registered, etc.) * * @param string $userEmail the user email * @@ -632,21 +632,11 @@ class API extends \Piwik\Plugin\API } } - private function getCleanAlias($alias, $userLogin) - { - if (empty($alias)) { - $alias = $userLogin; - } - - return $alias; - } - /** * Add a user in the database. * A user is defined by * - a login that has to be unique and valid * - a password that has to be valid - * - an alias * - an email that has to be in a correct format * * @see userExists() @@ -656,7 +646,7 @@ class API extends \Piwik\Plugin\API * * @exception in case of an invalid parameter */ - public function addUser($userLogin, $password, $email, $alias = false, $_isPasswordHashed = false, $initialIdSite = null) + public function addUser($userLogin, $password, $email, $_isPasswordHashed = false, $initialIdSite = null) { Piwik::checkUserHasSomeAdminAccess(); UsersManager::dieIfUsersAdminIsDisabled(); @@ -682,10 +672,9 @@ class API extends \Piwik\Plugin\API $passwordTransformed = $password; } - $alias = $this->getCleanAlias($alias, $userLogin); $passwordTransformed = $this->password->hash($passwordTransformed); - $this->model->addUser($userLogin, $passwordTransformed, $email, $alias, Date::now()->getDatetime()); + $this->model->addUser($userLogin, $passwordTransformed, $email, Date::now()->getDatetime()); // we reload the access list which doesn't yet take in consideration this new user Access::getInstance()->reloadAccess(); @@ -696,7 +685,7 @@ class API extends \Piwik\Plugin\API * * @param string $userLogin The new user's login handle. */ - Piwik::postEvent('UsersManager.addUser.end', array($userLogin, $email, $password, $alias)); + Piwik::postEvent('UsersManager.addUser.end', array($userLogin, $email, $password)); if ($initialIdSite) { $this->setUserAccess($userLogin, 'view', $initialIdSite); @@ -820,9 +809,6 @@ class API extends \Piwik\Plugin\API } $newUser = array('login' => $user['login']); - if (isset($user['alias'])) { - $newUser['alias'] = $user['alias']; - } if ($user['login'] === Piwik::getCurrentUserLogin() || !empty($user['superuser_access'])) { $newUser['email'] = $user['email']; @@ -851,7 +837,7 @@ class API extends \Piwik\Plugin\API * * @see addUser() for all the parameters */ - public function updateUser($userLogin, $password = false, $email = false, $alias = false, + public function updateUser($userLogin, $password = false, $email = false, $_isPasswordHashed = false, $passwordConfirmation = false) { $requirePasswordConfirmation = self::$UPDATE_USER_REQUIRE_PASSWORD_CONFIRMATION; @@ -890,10 +876,6 @@ class API extends \Piwik\Plugin\API $passwordHasBeenUpdated = true; } - if (empty($alias)) { - $alias = $userInfo['alias']; - } - if (empty($email)) { $email = $userInfo['email']; } @@ -909,9 +891,7 @@ class API extends \Piwik\Plugin\API $this->confirmCurrentUserPassword($passwordConfirmation); } - $alias = $this->getCleanAlias($alias, $userLogin); - - $this->model->updateUser($userLogin, $password, $email, $alias); + $this->model->updateUser($userLogin, $password, $email); Cache::deleteTrackerCache(); @@ -930,7 +910,7 @@ class API extends \Piwik\Plugin\API * @param string $userLogin The user's login handle. * @param boolean $passwordHasBeenUpdated Flag containing information about password change. */ - Piwik::postEvent('UsersManager.updateUser.end', array($userLogin, $passwordHasBeenUpdated, $email, $password, $alias)); + Piwik::postEvent('UsersManager.updateUser.end', array($userLogin, $passwordHasBeenUpdated, $email, $password)); } /** diff --git a/plugins/UsersManager/Model.php b/plugins/UsersManager/Model.php index 15dd22c40b..0363234465 100644 --- a/plugins/UsersManager/Model.php +++ b/plugins/UsersManager/Model.php @@ -423,12 +423,11 @@ class Model } } - public function addUser($userLogin, $hashedPassword, $email, $alias, $dateRegistered) + public function addUser($userLogin, $hashedPassword, $email, $dateRegistered) { $user = array( 'login' => $userLogin, 'password' => $hashedPassword, - 'alias' => $alias, 'email' => $email, 'date_registered' => $dateRegistered, 'superuser_access' => 0, @@ -483,11 +482,10 @@ class Model return $users; } - public function updateUser($userLogin, $hashedPassword, $email, $alias) + public function updateUser($userLogin, $hashedPassword, $email) { $fields = array( - 'alias' => $alias, - 'email' => $email, + 'email' => $email, ); if (!empty($hashedPassword)) { $fields['password'] = $hashedPassword; diff --git a/plugins/UsersManager/UserUpdater.php b/plugins/UsersManager/UserUpdater.php index c94e9dbfa2..4bec5800d4 100644 --- a/plugins/UsersManager/UserUpdater.php +++ b/plugins/UsersManager/UserUpdater.php @@ -18,12 +18,15 @@ class UserUpdater * @param $userLogin * @param bool $password * @param bool $email - * @param bool $alias * @param bool $_isPasswordHashed * @throws \Exception */ - public function updateUserWithoutCurrentPassword($userLogin, $password = false, $email = false, $alias = false, - $_isPasswordHashed = false) + public function updateUserWithoutCurrentPassword( + $userLogin, + $password = false, + $email = false, + $_isPasswordHashed = false + ) { API::$UPDATE_USER_REQUIRE_PASSWORD_CONFIRMATION = false; try { @@ -31,7 +34,6 @@ class UserUpdater 'userLogin' => $userLogin, 'password' => $password, 'email' => $email, - 'alias' => $alias, '_isPasswordHashed' => $_isPasswordHashed, ], $default = []); API::$UPDATE_USER_REQUIRE_PASSWORD_CONFIRMATION = true; diff --git a/plugins/UsersManager/angularjs/user-edit-form/user-edit-form.component.js b/plugins/UsersManager/angularjs/user-edit-form/user-edit-form.component.js index 5c3a88d0a3..c3502a45e9 100644 --- a/plugins/UsersManager/angularjs/user-edit-form/user-edit-form.component.js +++ b/plugins/UsersManager/angularjs/user-edit-form/user-edit-form.component.js @@ -166,7 +166,6 @@ userLogin: vm.user.login, password: vm.user.password, email: vm.user.email, - alias: vm.user.alias, initialIdSite: vm.firstSiteAccess ? vm.firstSiteAccess.id : undefined }).catch(function (e) { vm.isSavingUserInfo = false; @@ -190,8 +189,7 @@ userLogin: vm.user.login, password: (vm.isPasswordModified && vm.user.password) ? vm.user.password : undefined, passwordConfirmation: vm.passwordConfirmation ? vm.passwordConfirmation : undefined, - email: vm.user.email, - alias: vm.user.alias + email: vm.user.email }).catch(function (e) { vm.isSavingUserInfo = false; vm.passwordConfirmation = false; diff --git a/plugins/UsersManager/lang/en.json b/plugins/UsersManager/lang/en.json index 8f23bae7c7..d9bd4b20b0 100644 --- a/plugins/UsersManager/lang/en.json +++ b/plugins/UsersManager/lang/en.json @@ -11,7 +11,6 @@ "EditUser": "Edit user", "CreateUser": "Create user", "SaveBasicInfo": "Save Basic Info", - "Alias": "Alias", "AllWebsites": "All websites", "LastUsed": "Last used", "ExpireDate": "Expire date", diff --git a/plugins/UsersManager/tests/Integration/APITest.php b/plugins/UsersManager/tests/Integration/APITest.php index cd5b43c269..18696703a1 100644 --- a/plugins/UsersManager/tests/Integration/APITest.php +++ b/plugins/UsersManager/tests/Integration/APITest.php @@ -311,14 +311,13 @@ class APITest extends IntegrationTestCase $identity = FakeAccess::$identity; FakeAccess::$identity = $this->login; // ensure password will be checked against this user - $this->api->updateUser($this->login, 'newPassword', 'email@example.com', 'newAlias', false, $this->password); + $this->api->updateUser($this->login, 'newPassword', 'email@example.com', false, $this->password); FakeAccess::$identity = $identity; $model = new Model(); $user = $model->getUser($this->login); $this->assertSame('email@example.com', $user['email']); - $this->assertSame('newAlias', $user['alias']); $passwordHelper = new Password(); @@ -342,7 +341,7 @@ class APITest extends IntegrationTestCase $identity = FakeAccess::$identity; FakeAccess::$identity = $this->login; // en - $this->api->updateUser($this->login, 'newPassword2', 'email2@example.com', 'newAlias2', false, $this->password); + $this->api->updateUser($this->login, 'newPassword2', 'email2@example.com', false, $this->password); FakeAccess::$identity = $identity; $subjects = array_map(function (Mail $mail) { return $mail->getSubject(); }, $capturedMails); @@ -359,7 +358,7 @@ class APITest extends IntegrationTestCase $identity = FakeAccess::$identity; FakeAccess::$identity = $this->login; // en - $this->api->updateUser($this->login, false, strtoupper($this->email), 'newAlias'); + $this->api->updateUser($this->login, false, strtoupper($this->email)); FakeAccess::$identity = $identity; $this->assertEquals([], $capturedMails); @@ -372,7 +371,7 @@ class APITest extends IntegrationTestCase $identity = FakeAccess::$identity; FakeAccess::$identity = $this->login; // ensure password will be checked against this user - $this->api->updateUser($this->login, false, 'email@example.com', 'newAlias', false, $this->password); + $this->api->updateUser($this->login, false, 'email@example.com', false, $this->password); FakeAccess::$identity = $identity; $user = $model->getUser($this->login); @@ -386,7 +385,7 @@ class APITest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionInvalidPasswordTooLong'); - $this->api->updateUser($this->login, str_pad('foo', UsersManager::PASSWORD_MAX_LENGTH + 1), 'email@example.com', 'newAlias', false, $this->password); + $this->api->updateUser($this->login, str_pad('foo', UsersManager::PASSWORD_MAX_LENGTH + 1), 'email@example.com', false, $this->password); } public function test_getSitesAccessFromUser_forSuperUser() @@ -428,7 +427,7 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'role' => 'view', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => '0'], + ['login' => 'userLogin2', 'role' => 'view', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => '0'], ]; $this->assertEquals($expected, $users); } @@ -441,7 +440,7 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1, $limit = null, $offset = 1); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'role' => 'view', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => '0'], + ['login' => 'userLogin2', 'role' => 'view', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => '0'], ]; $this->assertEquals($expected, $users); } @@ -455,7 +454,7 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1, null, null, null, 'superuser'); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'role' => 'view', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => '0'], + ['login' => 'userLogin2', 'role' => 'view', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => '0'], ]; $this->assertEquals($expected, $users); } @@ -471,9 +470,9 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'role' => 'admin', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => false], - ['login' => 'userLogin3', 'alias' => 'userLogin3', 'role' => 'view', 'capabilities' => [], 'superuser_access' => false], - ['login' => 'userLogin4', 'alias' => 'userLogin4', 'role' => 'admin', 'capabilities' => [], 'superuser_access' => false], + ['login' => 'userLogin2', 'role' => 'admin', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => false], + ['login' => 'userLogin3', 'role' => 'view', 'capabilities' => [], 'superuser_access' => false], + ['login' => 'userLogin4', 'role' => 'admin', 'capabilities' => [], 'superuser_access' => false], ]; $this->assertEquals($expected, $users); } @@ -490,10 +489,10 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'role' => 'admin', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => false], - ['login' => 'userLogin3', 'alias' => 'userLogin3', 'role' => 'view', 'capabilities' => [], 'superuser_access' => false], - ['login' => 'userLogin4', 'alias' => 'userLogin4', 'role' => 'admin', 'capabilities' => [], 'superuser_access' => false], - ['login' => 'userLogin5', 'alias' => 'userLogin5', 'role' => 'noaccess', 'capabilities' => [], 'superuser_access' => false], + ['login' => 'userLogin2', 'role' => 'admin', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => false], + ['login' => 'userLogin3', 'role' => 'view', 'capabilities' => [], 'superuser_access' => false], + ['login' => 'userLogin4', 'role' => 'admin', 'capabilities' => [], 'superuser_access' => false], + ['login' => 'userLogin5', 'role' => 'noaccess', 'capabilities' => [], 'superuser_access' => false], ]; $this->assertEquals($expected, $users); } @@ -509,11 +508,11 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin', 'alias' => 'userLogin', 'email' => 'userlogin@password.de', 'superuser_access' => false, 'role' => 'noaccess', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'email' => 'userLogin2@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin3', 'alias' => 'userLogin3', 'email' => 'userLogin3@password.de', 'superuser_access' => false, 'role' => 'view', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin4', 'alias' => 'userLogin4', 'email' => 'userLogin4@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin5', 'alias' => 'userLogin5', 'email' => 'userLogin5@password.de', 'superuser_access' => false, 'role' => 'noaccess', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin', 'email' => 'userlogin@password.de', 'superuser_access' => false, 'role' => 'noaccess', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin2', 'email' => 'userLogin2@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin3', 'email' => 'userLogin3@password.de', 'superuser_access' => false, 'role' => 'view', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin4', 'email' => 'userLogin4@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin5', 'email' => 'userLogin5@password.de', 'superuser_access' => false, 'role' => 'noaccess', 'capabilities' => [], 'uses_2fa' => false], ]; $this->assertEquals($expected, $users); } @@ -530,8 +529,8 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1, null, null, null, 'admin'); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'role' => 'admin', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => false], - ['login' => 'userLogin5', 'alias' => 'userLogin5', 'role' => 'admin', 'capabilities' => [], 'superuser_access' => false], + ['login' => 'userLogin2', 'role' => 'admin', 'capabilities' => [], 'email' => 'userLogin2@password.de', 'superuser_access' => false], + ['login' => 'userLogin5', 'role' => 'admin', 'capabilities' => [], 'superuser_access' => false], ]; $this->assertEquals($expected, $users); @@ -539,7 +538,7 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1, null, null, null, 'write'); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin6', 'alias' => 'userLogin6', 'role' => 'write', 'capabilities' => [], 'superuser_access' => false], + ['login' => 'userLogin6', 'role' => 'write', 'capabilities' => [], 'superuser_access' => false], ]; $this->assertEquals($expected, $users); } @@ -554,9 +553,9 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1, null, null, null, 'noaccess'); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin', 'alias' => 'userLogin', 'role' => 'noaccess', 'superuser_access' => false, 'email' => 'userlogin@password.de', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'role' => 'noaccess', 'superuser_access' => false, 'email' => 'userLogin2@password.de', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin5', 'alias' => 'userLogin5', 'role' => 'noaccess', 'superuser_access' => false, 'email' => 'userLogin5@password.de', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin', 'role' => 'noaccess', 'superuser_access' => false, 'email' => 'userlogin@password.de', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin2', 'role' => 'noaccess', 'superuser_access' => false, 'email' => 'userLogin2@password.de', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin5', 'role' => 'noaccess', 'superuser_access' => false, 'email' => 'userLogin5@password.de', 'capabilities' => [], 'uses_2fa' => false], ]; $this->assertEquals($expected, $users); } @@ -574,25 +573,25 @@ class APITest extends IntegrationTestCase $users = $this->api->getUsersPlusRole(1, null, null, null, 'superuser'); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'email' => 'userLogin2@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin4', 'alias' => 'userLogin4', 'email' => 'userLogin4@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin2', 'email' => 'userLogin2@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin4', 'email' => 'userLogin4@password.de', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], ]; $this->assertEquals($expected, $users); } public function test_getUsersPlusRole_shouldSearchByTextCorrectly() { - $this->addUserWithAccess('searchTextLogin', 'superuser', 1, 'someemail@email.com', 'alias'); + $this->addUserWithAccess('searchTextLogin', 'superuser', 1, 'someemail@email.com'); $this->addUserWithAccess('userLogin2', 'view', 1, 'searchTextdef@email.com'); - $this->addUserWithAccess('userLogin3', 'superuser', 1, 'someemail2@email.com', 'alias-searchTextABC'); + $this->addUserWithAccess('userLogin3', 'superuser', 1, 'someemail2@email.com'); $this->addUserWithAccess('userLogin4', null, 1); $this->setCurrentUser('searchTextLogin', 'superuser', 1); $users = $this->api->getUsersPlusRole(1, null, null, 'searchText'); $this->cleanUsers($users); $expected = [ - ['login' => 'searchTextLogin', 'alias' => 'alias', 'email' => 'someemail@email.com', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'email' => 'searchTextdef@email.com', 'superuser_access' => false, 'role' => 'view', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'searchTextLogin', 'email' => 'someemail@email.com', 'superuser_access' => true, 'role' => 'superuser', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin2', 'email' => 'searchTextdef@email.com', 'superuser_access' => false, 'role' => 'view', 'capabilities' => [], 'uses_2fa' => false], ]; $this->assertEquals($expected, $users); } @@ -601,15 +600,15 @@ class APITest extends IntegrationTestCase { $this->addUserWithAccess('searchTextLogin', 'superuser', 1, 'someemail@email.com'); $this->addUserWithAccess('userLogin2', 'view', 1, 'searchTextdef@email.com'); - $this->addUserWithAccess('userLogin3', 'superuser', 1, 'someemail2@email.com', 'alias-searchTextABC'); + $this->addUserWithAccess('userLogin3', 'superuser', 1, 'someemail2@email.com'); $this->addUserWithAccess('userLogin4', null, 1); $this->setCurrentUser('searchTextLogin', 'superuser', 1); $users = $this->api->getUsersPlusRole(1, $limit = 2, $offset = 1); $this->cleanUsers($users); $expected = [ - ['login' => 'userLogin', 'alias' => 'userLogin', 'email' => 'userlogin@password.de', 'superuser_access' => false, 'role' => 'noaccess', 'capabilities' => [], 'uses_2fa' => false], - ['login' => 'userLogin2', 'alias' => 'userLogin2', 'email' => 'searchTextdef@email.com', 'superuser_access' => false, 'role' => 'view', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin', 'email' => 'userlogin@password.de', 'superuser_access' => false, 'role' => 'noaccess', 'capabilities' => [], 'uses_2fa' => false], + ['login' => 'userLogin2', 'email' => 'searchTextdef@email.com', 'superuser_access' => false, 'role' => 'view', 'capabilities' => [], 'uses_2fa' => false], ]; $this->assertEquals($expected, $users); } @@ -1027,9 +1026,9 @@ class APITest extends IntegrationTestCase ); } - private function addUserWithAccess($username, $accessLevel, $idSite, $email = null, $alias = null) + private function addUserWithAccess($username, $accessLevel, $idSite, $email = null) { - $this->api->addUser($username, 'password', $email ?: "$username@password.de", $alias); + $this->api->addUser($username, 'password', $email ?: "$username@password.de"); if ($accessLevel == 'superuser') { $userUpdater = new UserUpdater(); $userUpdater->setSuperUserAccessWithoutCurrentPassword($username, true); diff --git a/plugins/UsersManager/tests/Integration/UserAccessFilterTest.php b/plugins/UsersManager/tests/Integration/UserAccessFilterTest.php index 5dacff9e16..06b05a618b 100644 --- a/plugins/UsersManager/tests/Integration/UserAccessFilterTest.php +++ b/plugins/UsersManager/tests/Integration/UserAccessFilterTest.php @@ -190,7 +190,7 @@ class UserAccessFilterTest extends IntegrationTestCase $expectedUsers = array(); foreach ($logins as $login) { - $user = array('login' => $login, 'alias' => 'test', 'password' => md5('pass')); + $user = array('login' => $login, 'password' => md5('pass')); $users[] = $user; if (in_array($login, $expectedLogins)) { @@ -283,16 +283,16 @@ class UserAccessFilterTest extends IntegrationTestCase private function createManyUsers() { - $this->model->addUser('login1', md5('pass'), 'email1@example.com', 'alias1', '2008-01-01 00:00:00'); - $this->model->addUser('login2', md5('pass'), 'email2@example.com', 'alias2', '2008-01-01 00:00:00'); + $this->model->addUser('login1', md5('pass'), 'email1@example.com', '2008-01-01 00:00:00'); + $this->model->addUser('login2', md5('pass'), 'email2@example.com', '2008-01-01 00:00:00'); // login3 won't have access to any site - $this->model->addUser('login3', md5('pass'), 'email3@example.com', 'alias3', '2008-01-01 00:00:00'); - $this->model->addUser('login4', md5('pass'), 'email4@example.com', 'alias4', '2008-01-01 00:00:00'); - $this->model->addUser('login5', md5('pass'), 'email5@example.com', 'alias5', '2008-01-01 00:00:00'); - $this->model->addUser('login6', md5('pass'), 'email6@example.com', 'alias6', '2008-01-01 00:00:00'); - $this->model->addUser('login7', md5('pass'), 'email7@example.com', 'alias7', '2008-01-01 00:00:00'); - $this->model->addUser('login8', md5('pass'), 'email8@example.com', 'alias8', '2008-01-01 00:00:00'); - $this->model->addUser('anonymous', '', 'ano@example.com', 'anonymous', '2008-01-01 00:00:00'); + $this->model->addUser('login3', md5('pass'), 'email3@example.com', '2008-01-01 00:00:00'); + $this->model->addUser('login4', md5('pass'), 'email4@example.com', '2008-01-01 00:00:00'); + $this->model->addUser('login5', md5('pass'), 'email5@example.com', '2008-01-01 00:00:00'); + $this->model->addUser('login6', md5('pass'), 'email6@example.com', '2008-01-01 00:00:00'); + $this->model->addUser('login7', md5('pass'), 'email7@example.com', '2008-01-01 00:00:00'); + $this->model->addUser('login8', md5('pass'), 'email8@example.com', '2008-01-01 00:00:00'); + $this->model->addUser('anonymous', '', 'ano@example.com', '2008-01-01 00:00:00'); $this->model->setSuperUserAccess('login1', true); // we treat this one as our superuser diff --git a/plugins/UsersManager/tests/Integration/UsersManagerTest.php b/plugins/UsersManager/tests/Integration/UsersManagerTest.php index 2a66f9dad2..5aac364007 100644 --- a/plugins/UsersManager/tests/Integration/UsersManagerTest.php +++ b/plugins/UsersManager/tests/Integration/UsersManagerTest.php @@ -84,14 +84,11 @@ class UsersManagerTest extends IntegrationTestCase return $result; } - private function _checkUserHasNotChanged($user, $newPassword, $newEmail = null, $newAlias = null) + private function _checkUserHasNotChanged($user, $newPassword, $newEmail = null) { if (is_null($newEmail)) { $newEmail = $user['email']; } - if (is_null($newAlias)) { - $newAlias = $user['alias']; - } $userAfter = $this->model->getUser($user["login"]); @@ -110,7 +107,6 @@ class UsersManagerTest extends IntegrationTestCase // implicitly checks password! $user['email'] = $newEmail; - $user['alias'] = $newAlias; $user['superuser_access'] = 0; $user['twofactor_secret'] = ''; @@ -130,10 +126,9 @@ class UsersManagerTest extends IntegrationTestCase $login = "login"; $user = array('login' => $login, 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); + 'email' => "test@test.com"); - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + $this->api->addUser($user['login'], $user['password'], $user['email']); try { $this->api->updateUser($login, "pas"); @@ -149,22 +144,22 @@ class UsersManagerTest extends IntegrationTestCase public function getAddUserInvalidLoginData() { return array( - array(9, "password", "email@email.com", "alias"), // wrong login / integer => exception - array("gegag'ggea'", "password", "email@email.com", "alias"), // wrong login / too short => exception - array("gegag11gge&", "password", "email@email.com", "alias"), // wrong login / too long => exception - array("geg'ag11gge@", "password", "email@email.com", "alias"), // wrong login / bad characters => exception + array(9, "password", "email@email.com"), // wrong login / integer => exception + array("gegag'ggea'", "password", "email@email.com"), // wrong login / too short => exception + array("gegag11gge&", "password", "email@email.com"), // wrong login / too long => exception + array("geg'ag11gge@", "password", "email@email.com"), // wrong login / bad characters => exception ); } /** * @dataProvider getAddUserInvalidLoginData */ - public function testAddUserWrongLogin($userLogin, $password, $email, $alias) + public function testAddUserWrongLogin($userLogin, $password, $email) { $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionInvalidLogin'); - $this->api->addUser($userLogin, $password, $email, $alias); + $this->api->addUser($userLogin, $password, $email); } public function testAddUserExistingLogin() @@ -172,8 +167,8 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionLoginExists'); - $this->api->addUser("test", "password", "email@email.com", "alias"); - $this->api->addUser("test", "password2", "em2ail@email.com", "al2ias"); + $this->api->addUser("test", "password", "email@email.com"); + $this->api->addUser("test", "password2", "em2ail@email.com"); } /** @@ -184,8 +179,8 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionLoginExists'); - $this->api->addUser("test", "password", "email@email.com", "alias"); - $this->api->addUser("TeSt", "password2", "em2ail@email.com", "al2ias"); + $this->api->addUser("test", "password", "email@email.com"); + $this->api->addUser("TeSt", "password2", "em2ail@email.com"); } /** @@ -194,20 +189,20 @@ class UsersManagerTest extends IntegrationTestCase public function getWrongPasswordTestData() { return array( - array("geggeqgeqag", "pas", "email@email.com", "alias"), // too short -> exception - array("geggeqgeqag", "", "email@email.com", "alias"), // empty -> exception + array("geggeqgeqag", "pas", "email@email.com"), // too short -> exception + array("geggeqgeqag", "", "email@email.com"), // empty -> exception ); } /** * @dataProvider getWrongPasswordTestData */ - public function testAddUserWrongPassword($userLogin, $password, $email, $alias) + public function testAddUserWrongPassword($userLogin, $password, $email) { $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionInvalidPassword'); - $this->api->addUser($userLogin, $password, $email, $alias); + $this->api->addUser($userLogin, $password, $email); } public function testAddUserWrongEmail() @@ -215,43 +210,17 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('mail'); - $this->api->addUser('geggeqgeqag', 'geqgeagae', "ema il@email.com", 'alias'); - } - - /** - * empty alias => use login - */ - public function testAddUserEmptyAlias() - { - $login = "geggeqgeqag"; - $this->api->addUser($login, "geqgeagae", "mgeagi@geq.com", ""); - $user = $this->api->getUser($login); - $this->assertEquals($login, $user['alias']); - $this->assertEquals($login, $user['login']); + $this->api->addUser('geggeqgeqag', 'geqgeagae', "ema il@email.com"); } /** * long password => should work - * empty alias => use login */ public function testAddUserLongPassword() { $login = "geggeqgeqag"; - $this->api->addUser($login, "geqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaeg", "mgeagi@geq.com", ""); - $user = $this->api->getUser($login); - $this->assertEquals($login, $user['alias']); - $this->assertEquals($login, $user['login']); - } - - /** - * no alias => use login - */ - public function testAddUserNoAliasSpecified() - { - $login = "geggeqg455eqag"; - $this->api->addUser($login, "geqgeagae", "mgeagi@geq.com"); + $this->api->addUser($login, "geqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaegeqgeagaeg", "mgeagi@geq.com"); $user = $this->api->getUser($login); - $this->assertEquals($login, $user['alias']); $this->assertEquals($login, $user['login']); } @@ -263,10 +232,9 @@ class UsersManagerTest extends IntegrationTestCase $login = "geggeq55eqag"; $password = "mypassword"; $email = "mgeag4544i@geq.com"; - $alias = "her is my alias )(&|\" '£%*(&%+))"; $time = time(); - $this->api->addUser($login, $password, $email, $alias); + $this->api->addUser($login, $password, $email); $user = $this->model->getUser($login); // check that the date registered is correct @@ -280,7 +248,6 @@ class UsersManagerTest extends IntegrationTestCase // check that all fields are the same $this->assertEquals($login, $user['login']); $this->assertEquals($email, $user['email']); - $this->assertEquals($alias, $user['alias']); $passwordHelper = new Password(); @@ -295,16 +262,14 @@ class UsersManagerTest extends IntegrationTestCase $login = "geggeq55eqag"; $password = "mypassword"; $email = "mgeag4544i@geq.com"; - $alias = "her is my alias )(&|\" '£%*(&%+))"; - $this->api->addUser($login, $password, $email, $alias, false, 1); + $this->api->addUser($login, $password, $email, false, 1); FakeAccess::$superUser = true; $user = $this->api->getUser($login); $this->assertEquals($login, $user['login']); $this->assertEquals($email, $user['email']); - $this->assertEquals($alias, $user['alias']); FakeAccess::$superUser = true; @@ -322,7 +287,7 @@ class UsersManagerTest extends IntegrationTestCase FakeAccess::$superUser = false; FakeAccess::$idSitesAdmin = [1]; - $this->api->addUser('userLogin2', 'password', 'userlogin2@email.com', 'userLogin2'); + $this->api->addUser('userLogin2', 'password', 'userlogin2@email.com'); } public function test_addUser_shouldNotAllowAdminUsersToCreateUsersWithAccessToSite_ThatAdminUserDoesNotHaveAccessTo() @@ -333,7 +298,7 @@ class UsersManagerTest extends IntegrationTestCase FakeAccess::$superUser = false; FakeAccess::$idSitesAdmin = [2]; - $this->api->addUser('userLogin2', 'password', 'userlogin2@email.com', 'userLogin2', false, 1); + $this->api->addUser('userLogin2', 'password', 'userlogin2@email.com', false, 1); } public function testDeleteUserDoesntExist() @@ -341,7 +306,7 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionUserDoesNotExist'); - $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com", "alias"); + $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com"); $this->api->deleteUser("geggeqggnew"); } @@ -367,8 +332,8 @@ class UsersManagerTest extends IntegrationTestCase $this->expectExceptionMessage('UsersManager_ExceptionDeleteOnlyUserWithSuperUserAccess'); //add user and set some rights - $this->api->addUser("regularuser", "geqgeagae1", "test1@test.com", "alias1"); - $this->api->addUser("superuser", "geqgeagae2", "test2@test.com", "alias2"); + $this->api->addUser("regularuser", "geqgeagae1", "test1@test.com"); + $this->api->addUser("superuser", "geqgeagae2", "test2@test.com"); $userUpdater = new UserUpdater(); $userUpdater->setSuperUserAccessWithoutCurrentPassword('superuser', true); @@ -386,7 +351,7 @@ class UsersManagerTest extends IntegrationTestCase $this->addSites(3); //add user and set some rights - $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com", "alias"); + $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com"); $this->api->setUserAccess("geggeqgeqag", "view", array(1, 2)); $this->api->setUserAccess("geggeqgeqag", "admin", array(1, 3)); @@ -405,7 +370,7 @@ class UsersManagerTest extends IntegrationTestCase } // add the same user - $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com", "alias"); + $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com"); //checks access have been deleted //to do so we recreate the same user login and check if the rights are still there @@ -415,7 +380,7 @@ class UsersManagerTest extends IntegrationTestCase public function testDeleteUser_deletesUserOptions() { Fixture::createSuperUser(); - $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com", "alias"); + $this->api->addUser("geggeqgeqag", "geqgeagae", "test@test.com"); Option::set(NewsletterSignup::NEWSLETTER_SIGNUP_OPTION . 'geggeqgeqag', 'yes'); $this->api->deleteUser("geggeqgeqag"); @@ -441,9 +406,8 @@ class UsersManagerTest extends IntegrationTestCase $login = "geggeq55eqag"; $password = "mypassword"; $email = "mgeag4544i@geq.com"; - $alias = ""; - $this->api->addUser($login, $password, $email, $alias); + $this->api->addUser($login, $password, $email); $user = $this->model->getUser($login); // check that all fields are the same @@ -451,9 +415,6 @@ class UsersManagerTest extends IntegrationTestCase self::assertIsString($user['password']); self::assertIsString($user['date_registered']); $this->assertEquals($email, $user['email']); - - //alias shouldn't be empty even if no alias specified - $this->assertGreaterThan(0, strlen($user['alias'])); } /** @@ -470,15 +431,15 @@ class UsersManagerTest extends IntegrationTestCase */ public function testGetUsers() { - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); - $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); + $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com"); $this->api->addUser("geggeqgeqagqegg", "geqgeaggggae", "tesgggt@tesgt.com"); $users = $this->api->getUsers(); $users = $this->_removeNonTestableFieldsFromUsers($users); - $user1 = array('login' => "gegg4564eqgeqag", 'alias' => "alias", 'email' => "tegst@tesgt.com", 'superuser_access' => 0, 'uses_2fa' => false); - $user2 = array('login' => "geggeqge632ge56a4qag", 'alias' => "alias", 'email' => "tesggt@tesgt.com", 'superuser_access' => 0, 'uses_2fa' => false); - $user3 = array('login' => "geggeqgeqagqegg", 'alias' => 'geggeqgeqagqegg', 'email' => "tesgggt@tesgt.com", 'superuser_access' => 0, 'uses_2fa' => false); + $user1 = array('login' => "gegg4564eqgeqag", 'email' => "tegst@tesgt.com", 'superuser_access' => 0, 'uses_2fa' => false); + $user2 = array('login' => "geggeqge632ge56a4qag", 'email' => "tesggt@tesgt.com", 'superuser_access' => 0, 'uses_2fa' => false); + $user3 = array('login' => "geggeqgeqagqegg", 'email' => "tesgggt@tesgt.com", 'superuser_access' => 0, 'uses_2fa' => false); $expectedUsers = array($user1, $user2, $user3); $this->assertEquals($expectedUsers, $users); $this->assertEquals(array($user1), $this->_removeNonTestableFieldsFromUsers($this->api->getUsers('gegg4564eqgeqag'))); @@ -490,8 +451,8 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('checkUserHasSomeAdminAccess Fake exception'); - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); - $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); + $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com"); $this->api->addUser("geggeqgeqagqegg", "geqgeaggggae", "tesgggt@tesgt.com"); FakeAccess::clearAccess($superUser = false, $admin = array(), $view = array(1), 'gegg4564eqgeqag'); @@ -515,8 +476,8 @@ class UsersManagerTest extends IntegrationTestCase */ public function testGetUsersLogin() { - $this->api->addUser('gegg4564eqgeqag', 'geqgegagae', 'tegst@tesgt.com', 'alias'); - $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com", "alias"); + $this->api->addUser('gegg4564eqgeqag', 'geqgegagae', 'tegst@tesgt.com'); + $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com"); $this->api->addUser("geggeqgeqagqegg", "geqgeaggggae", "tesgggt@tesgt.com"); $logins = $this->api->getUsersLogin(); @@ -526,8 +487,8 @@ class UsersManagerTest extends IntegrationTestCase public function testGetUserLoginFromUserEmail() { - $this->api->addUser('gegg4564eqgeqag', 'geqgegagae', 'tegst@tesgt.com', 'alias'); - $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com", "alias"); + $this->api->addUser('gegg4564eqgeqag', 'geqgegagae', 'tegst@tesgt.com'); + $this->api->addUser("geggeqge632ge56a4qag", "geqgegeagae", "tesggt@tesgt.com"); $this->api->addUser("geggeqgeqagqegg", "geqgeaggggae", "tesgggt@tesgt.com"); $this->assertSame('gegg4564eqgeqag', $this->api->getUserLoginFromUserEmail('tegst@tesgt.com')); @@ -567,7 +528,7 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionAccessValues'); - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); FakeAccess::clearAccess($superUser = false, $admin =array(1), $view = array()); $this->api->setUserAccess("gegg4564eqgeqag", "viewnotknown", 1); } @@ -577,7 +538,7 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionAccessValues'); - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); FakeAccess::clearAccess($superUser = false, $admin =array(1), $view = array()); $this->api->setUserAccess("gegg4564eqgeqag", "superuser", 1); } @@ -596,7 +557,7 @@ class UsersManagerTest extends IntegrationTestCase $this->expectException(\Exception::class); $this->expectExceptionMessage('UsersManager_ExceptionUserHasSuperUserAccess'); - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); $userUpdater = new UserUpdater(); $userUpdater->setSuperUserAccessWithoutCurrentPassword('gegg4564eqgeqag', true); @@ -609,7 +570,7 @@ class UsersManagerTest extends IntegrationTestCase */ public function testSetUserAccessIdsitesIsAll() { - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); FakeAccess::$superUser = false; @@ -640,7 +601,7 @@ class UsersManagerTest extends IntegrationTestCase $this->addSites(1); $idSites = [1, 2, 3, 4, 5]; - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); $this->api->setUserAccess("gegg4564eqgeqag", "view", "all"); $access = $this->api->getSitesAccessFromUser("gegg4564eqgeqag"); @@ -652,7 +613,7 @@ class UsersManagerTest extends IntegrationTestCase { $this->expectException(\Exception::class); - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); $this->api->setUserAccess("gegg4564eqgeqag", "view", array()); } @@ -662,7 +623,7 @@ class UsersManagerTest extends IntegrationTestCase */ public function testSetUserAccessIdsitesOneSite() { - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); $idSites = $this->addSites(1); $this->api->setUserAccess("gegg4564eqgeqag", "view", $idSites); @@ -677,7 +638,7 @@ class UsersManagerTest extends IntegrationTestCase */ public function testSetUserAccessIdsitesMultipleSites() { - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); list($id1, $id2, $id3) = $this->addSites(3); $this->api->setUserAccess("gegg4564eqgeqag", "view", array($id1, $id3)); @@ -692,7 +653,7 @@ class UsersManagerTest extends IntegrationTestCase */ public function testSetUserAccessWithIdSitesIsStringCommaSeparated() { - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); $this->api->setUserAccess("gegg4564eqgeqag", "view", "1,3"); @@ -706,7 +667,7 @@ class UsersManagerTest extends IntegrationTestCase */ public function testSetUserAccessMultipleCallDistinctAccessSameUser() { - $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("gegg4564eqgeqag", "geqgegagae", "tegst@tesgt.com"); list($id1, $id2) = $this->addSites(2); @@ -723,8 +684,8 @@ class UsersManagerTest extends IntegrationTestCase */ public function testSetUserAccessMultipleCallDistinctAccessMultipleUser() { - $this->api->addUser("user1", "geqgegagae", "tegst@tesgt.com", "alias"); - $this->api->addUser("user2", "geqgegagae", "tegst2@tesgt.com", "alias"); + $this->api->addUser("user1", "geqgegagae", "tegst@tesgt.com"); + $this->api->addUser("user2", "geqgegagae", "tegst2@tesgt.com"); list($id1, $id2, $id3) = $this->addSites(3); @@ -779,7 +740,7 @@ class UsersManagerTest extends IntegrationTestCase */ public function testSetUserAccessMultipleCallOverwriteSingleUserOneSite() { - $this->api->addUser("user1", "geqgegagae", "tegst@tesgt.com", "alias"); + $this->api->addUser("user1", "geqgegagae", "tegst@tesgt.com"); list($id1, $id2) = $this->addSites(2); @@ -926,26 +887,6 @@ class UsersManagerTest extends IntegrationTestCase $this->api->updateUser("lolgin", "password"); } - /** - * no email no alias => keep old ones - */ - public function testUpdateUserNoEmailNoAlias() - { - $login = "login"; - $user = array('login' => $login, - 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); - - - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); - - FakeAccess::$identity = 'login'; - $this->api->updateUser($login, "passowordOK", false, false, false, "geqgeagae"); - - $this->_checkUserHasNotChanged($user, "passowordOK"); - } - public function testUpdateUserFailsNoCurrentPassword() { $this->expectException(\Exception::class); @@ -954,13 +895,12 @@ class UsersManagerTest extends IntegrationTestCase $login = "login"; $user = array('login' => $login, 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); + 'email' => "test@test.com"); - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + $this->api->addUser($user['login'], $user['password'], $user['email']); FakeAccess::$identity = 'login'; - $this->api->updateUser($login, "passowordOK", false, false, false, ""); + $this->api->updateUser($login, "passowordOK", false, false, ""); } public function testUpdateUserFailsWrongCurrentPassword() @@ -971,13 +911,12 @@ class UsersManagerTest extends IntegrationTestCase $login = "login"; $user = array('login' => $login, 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); + 'email' => "test@test.com"); - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + $this->api->addUser($user['login'], $user['password'], $user['email']); FakeAccess::$identity = 'login'; - $this->api->updateUser($login, "passowordOK", false, false, false, "geqgeag"); + $this->api->updateUser($login, "passowordOK", false, false, "geqgeag"); } public function testUpdateUserFailsWrongCurrentPassword_requiresThePasswordOfCurrentLoggedInUser() @@ -988,12 +927,11 @@ class UsersManagerTest extends IntegrationTestCase $login = "login"; $user = array('login' => $login, 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); + 'email' => "test@test.com"); - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + $this->api->addUser($user['login'], $user['password'], $user['email']); // currently logged in is a super user and not "login". therefore the password of "login" won't work - $this->api->updateUser($login, "passowordOK", false, false, false, "geqgeag"); + $this->api->updateUser($login, "passowordOK", false, false, "geqgeag"); } /** @@ -1004,34 +942,14 @@ class UsersManagerTest extends IntegrationTestCase $login = "login"; $user = array('login' => $login, 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); - - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); - - FakeAccess::$identity = 'login'; - $this->api->updateUser($login, "passowordOK", null, "newalias", false, "geqgeagae"); - - $this->_checkUserHasNotChanged($user, "passowordOK", null, "newalias"); - } - - /** - * no alias => keep old ones - */ - public function testUpdateUserNoAlias() - { - $login = "login"; - $user = array('login' => $login, - 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); + 'email' => "test@test.com"); - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + $this->api->addUser($user['login'], $user['password'], $user['email']); FakeAccess::$identity = 'login'; - $this->api->updateUser($login, "passowordOK", "email@geaga.com", false, false, "geqgeagae"); + $this->api->updateUser($login, "passowordOK", null, false, "geqgeagae"); - $this->_checkUserHasNotChanged($user, "passowordOK", "email@geaga.com"); + $this->_checkUserHasNotChanged($user, "passowordOK", null); } /** @@ -1043,7 +961,7 @@ class UsersManagerTest extends IntegrationTestCase $this->expectExceptionMessage('UsersManager_ExceptionLoginExists'); FakeAccess::$identity = 'login'; - $this->testUpdateUserNoEmailNoAlias(); + $this->testUpdateUserNoEmail(); } /** @@ -1055,7 +973,7 @@ class UsersManagerTest extends IntegrationTestCase FakeAccess::$identity = 'login2'; FakeAccess::$superUser = false; - $this->testUpdateUserNoEmailNoAlias(); + $this->testUpdateUserNoEmail(); } /** @@ -1066,15 +984,14 @@ class UsersManagerTest extends IntegrationTestCase $login = "login"; $user = array('login' => $login, 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); + 'email' => "test@test.com"); - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + $this->api->addUser($user['login'], $user['password'], $user['email']); FakeAccess::$identity = 'login'; - $this->api->updateUser($login, "passowordOK", "email@geaga.com", "NEW ALIAS", false, "geqgeagae"); + $this->api->updateUser($login, "passowordOK", "email@geaga.com", false, "geqgeagae"); - $this->_checkUserHasNotChanged($user, "passowordOK", "email@geaga.com", "NEW ALIAS"); + $this->_checkUserHasNotChanged($user, "passowordOK", "email@geaga.com"); } public function testGetUserByEmailInvalidMail() @@ -1088,16 +1005,14 @@ class UsersManagerTest extends IntegrationTestCase { $user = array('login' => "login", 'password' => "geqgeagae", - 'email' => "test@test.com", - 'alias' => "alias"); + 'email' => "test@test.com"); - $this->api->addUser($user['login'], $user['password'], $user['email'], $user['alias']); + $this->api->addUser($user['login'], $user['password'], $user['email']); $userByMail = $this->api->getUserByEmail($user['email']); $this->assertEquals($user['login'], $userByMail['login']); $this->assertEquals($user['email'], $userByMail['email']); - $this->assertEquals($user['alias'], $userByMail['alias']); } public function testGetUserPreferenceDefault() diff --git a/plugins/UsersManager/tests/System/ApiTest.php b/plugins/UsersManager/tests/System/ApiTest.php index 5908f9245c..a3c0caafa4 100644 --- a/plugins/UsersManager/tests/System/ApiTest.php +++ b/plugins/UsersManager/tests/System/ApiTest.php @@ -103,12 +103,11 @@ class ApiTest extends SystemTestCase $this->assertSame('login1', $user['login']); } - /** - * @expectedException \Exception - * @expectedExceptionMessage is expecting a MD5-hashed password - */ public function test_createAppSpecificTokenAuth_notValidPasswordFormat() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('is expecting a MD5-hashed password'); + $this->api->createAppSpecificTokenAuth('login1', 'foobar', 'test'); } diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login1_when_superuseraccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login1_when_superuseraccess.xml index c460ef3a4c..7d5e9f04d5 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login1_when_superuseraccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login1_when_superuseraccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login1</login> - <alias>login1</alias> <email>login1@example.com</email> <superuser_access>1</superuser_access> diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_adminaccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_adminaccess.xml index 6e71ca57aa..98231bbff5 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_adminaccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_adminaccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login2</login> - <alias>login2</alias> <email>login2@example.com</email> <superuser_access>0</superuser_access> </row> diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_superuseraccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_superuseraccess.xml index 7498981d07..54911c0683 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_superuseraccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login2_when_superuseraccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login2</login> - <alias>login2</alias> <email>login2@example.com</email> <superuser_access>0</superuser_access> diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_superuseraccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_superuseraccess.xml index 57c49e0cb9..34ce84a53a 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_superuseraccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_superuseraccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login4</login> - <alias>login4</alias> <email>login4@example.com</email> <superuser_access>0</superuser_access> diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_viewaccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_viewaccess.xml index 01f8684c42..b6cf8cb4c4 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_viewaccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login4_when_viewaccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login4</login> - <alias>login4</alias> <email>login4@example.com</email> <superuser_access>0</superuser_access> </row> diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login6_when_superuseraccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login6_when_superuseraccess.xml index 8573855563..22e1ebfb9a 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login6_when_superuseraccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUser_login6_when_superuseraccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login6</login> - <alias>login6</alias> <email>login6@example.com</email> <superuser_access>0</superuser_access> diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsersWithSiteAccess_3_admin_when_superuseraccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsersWithSiteAccess_3_admin_when_superuseraccess.xml index 52c2cc1a6e..76bc3e287e 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsersWithSiteAccess_3_admin_when_superuseraccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsersWithSiteAccess_3_admin_when_superuseraccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login5</login> - <alias>login5</alias> <email>login5@example.com</email> <superuser_access>0</superuser_access> @@ -10,7 +9,6 @@ </row> <row> <login>login6</login> - <alias>login6</alias> <email>login6@example.com</email> <superuser_access>0</superuser_access> diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_adminaccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_adminaccess.xml index 5000925acd..5d44c5ddb4 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_adminaccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_adminaccess.xml @@ -2,33 +2,27 @@ <result> <row> <login>login2</login> - <alias>login2</alias> <email>login2@example.com</email> <superuser_access>0</superuser_access> </row> <row> <login>login4</login> - <alias>login4</alias> <superuser_access>0</superuser_access> </row> <row> <login>login6</login> - <alias>login6</alias> <superuser_access>0</superuser_access> </row> <row> <login>login7</login> - <alias>login7</alias> <superuser_access>0</superuser_access> </row> <row> <login>login8</login> - <alias>login8</alias> <superuser_access>0</superuser_access> </row> <row> <login>login9</login> - <alias>login9</alias> <superuser_access>0</superuser_access> </row> </result>
\ No newline at end of file diff --git a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_superuseraccess.xml b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_superuseraccess.xml index 701f33a009..ea79a48238 100644 --- a/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_superuseraccess.xml +++ b/plugins/UsersManager/tests/System/expected/test___UsersManager.getUsers__when_superuseraccess.xml @@ -2,7 +2,6 @@ <result> <row> <login>login1</login> - <alias>login1</alias> <email>login1@example.com</email> <superuser_access>1</superuser_access> @@ -10,7 +9,6 @@ </row> <row> <login>login10</login> - <alias>login10</alias> <email>login10@example.com</email> <superuser_access>1</superuser_access> @@ -18,7 +16,6 @@ </row> <row> <login>login2</login> - <alias>login2</alias> <email>login2@example.com</email> <superuser_access>0</superuser_access> @@ -26,7 +23,6 @@ </row> <row> <login>login3</login> - <alias>login3</alias> <email>login3@example.com</email> <superuser_access>0</superuser_access> @@ -34,7 +30,6 @@ </row> <row> <login>login4</login> - <alias>login4</alias> <email>login4@example.com</email> <superuser_access>0</superuser_access> @@ -42,7 +37,6 @@ </row> <row> <login>login5</login> - <alias>login5</alias> <email>login5@example.com</email> <superuser_access>0</superuser_access> @@ -50,7 +44,6 @@ </row> <row> <login>login6</login> - <alias>login6</alias> <email>login6@example.com</email> <superuser_access>0</superuser_access> @@ -58,7 +51,6 @@ </row> <row> <login>login7</login> - <alias>login7</alias> <email>login7@example.com</email> <superuser_access>0</superuser_access> @@ -66,7 +58,6 @@ </row> <row> <login>login8</login> - <alias>login8</alias> <email>login8@example.com</email> <superuser_access>0</superuser_access> @@ -74,7 +65,6 @@ </row> <row> <login>login9</login> - <alias>login9</alias> <email>login9@example.com</email> <superuser_access>0</superuser_access> @@ -82,7 +72,6 @@ </row> <row> <login>superUserLogin</login> - <alias>superUserLogin</alias> <email>hello@example.org</email> <superuser_access>1</superuser_access> |