Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-03-23 01:49:36 +0300
committerGitHub <noreply@github.com>2020-03-23 01:49:36 +0300
commit93f5717c03170975b3bd3925dbc16f77dc9b3327 (patch)
tree01b869aa3ed235f1488a07282ba4d23f45b78812 /plugins/Login
parent0eb8c7c08676e50c955fd2e1081b490a62026a59 (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/Login')
-rw-r--r--plugins/Login/Auth.php2
-rw-r--r--plugins/Login/PasswordResetter.php7
-rw-r--r--plugins/Login/tests/Integration/LoginTest.php3
3 files changed, 8 insertions, 4 deletions
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();