diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-10-28 10:31:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 10:31:55 +0300 |
commit | 518fcb3daee432d6ce76ee9e5d166e7c1ce67889 (patch) | |
tree | 4664f026a07ee7144a80c98a4095e34ace5dd646 /plugins/TwoFactorAuth | |
parent | e6ad78bbbc92443d7b0db7223fbf124cb01c61fb (diff) |
Introduce new config setting to set a contact email address (#17916)
* Introduce new config setting to set a contact email address
to use instead of all super user email addresses
* fix test
* apply review feedback
* updates expected UI tests
Diffstat (limited to 'plugins/TwoFactorAuth')
-rw-r--r-- | plugins/TwoFactorAuth/Controller.php | 3 | ||||
-rw-r--r-- | plugins/TwoFactorAuth/templates/loginTwoFactorAuth.twig | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/plugins/TwoFactorAuth/Controller.php b/plugins/TwoFactorAuth/Controller.php index e7936b5202..3ff82ac44c 100644 --- a/plugins/TwoFactorAuth/Controller.php +++ b/plugins/TwoFactorAuth/Controller.php @@ -109,8 +109,7 @@ class Controller extends \Piwik\Plugin\Controller } } } - $superUsers = Request::processRequest('UsersManager.getUsersHavingSuperUserAccess', [], []); - $view->superUserEmails = implode(',', array_column($superUsers, 'email')); + $view->contactEmail = implode(',', Piwik::getContactEmailAddresses()); $view->loginModule = Piwik::getLoginPluginName(); $view->AccessErrorString = $messageNoAccess; $view->addForm($form); diff --git a/plugins/TwoFactorAuth/templates/loginTwoFactorAuth.twig b/plugins/TwoFactorAuth/templates/loginTwoFactorAuth.twig index 7169f5dbf1..0f18a0dfd2 100644 --- a/plugins/TwoFactorAuth/templates/loginTwoFactorAuth.twig +++ b/plugins/TwoFactorAuth/templates/loginTwoFactorAuth.twig @@ -46,7 +46,7 @@ <br /> <a href="https://matomo.org/faq/how-to/faq_27248" rel="noreferrer noopener">{{ 'TwoFactorAuth_EnterRecoveryCodeInstead'|translate }}</a> <br /> - <a href="mailto:{{ superUserEmails|e('url') }}?subject={{ 'TwoFactorAuth_NotPossibleToLogIn'|translate|e('url') }}&body={{ 'TwoFactorAuth_LostAuthenticationDevice'|translate("\n\n", "\n\n", piwikUrl|default(''), "\n\n", userLogin, "https://matomo.org/faq/how-to/faq_27248")|e('url') }}" rel="noreferrer noopener">{{ 'TwoFactorAuth_AskSuperUserResetAuthenticationCode'|translate }}</a> + <a href="mailto:{{ contactEmail|e('url') }}?subject={{ 'TwoFactorAuth_NotPossibleToLogIn'|translate|e('url') }}&body={{ 'TwoFactorAuth_LostAuthenticationDevice'|translate("\n\n", "\n\n", piwikUrl|default(''), "\n\n", userLogin, "https://matomo.org/faq/how-to/faq_27248")|e('url') }}" rel="noreferrer noopener">{{ 'TwoFactorAuth_AskSuperUserResetAuthenticationCode'|translate }}</a> <br /> <a href="{{ linkTo({'module': loginModule, 'action': 'logout'}) }}" rel="noreferrer noopener">{{ 'General_Logout'|translate }}</a> </p> |