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:
authordiosmosis <diosmosis@users.noreply.github.com>2019-03-08 01:42:03 +0300
committerGitHub <noreply@github.com>2019-03-08 01:42:03 +0300
commit0648513483a7c12eec6cc0aa55d49f87c061f6b0 (patch)
tree55e49065186371f8504c4dd9eb23df17f0a9c49c /plugins/Login
parent7153700fe2e0ca4144854f60af2145457c3e00ce (diff)
Send email notification when user email changes. (#14136)
* Send email notification when user email changes. * Forgot to add file. * Apply pr fixes + send email for password changes too. * Add quick test for new emails. * Translate text * Refactor according to review. * ucfirst device name * Fixing integration test
Diffstat (limited to 'plugins/Login')
-rw-r--r--plugins/Login/tests/Integration/PasswordResetterTest.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/Login/tests/Integration/PasswordResetterTest.php b/plugins/Login/tests/Integration/PasswordResetterTest.php
index 4ae99797bb..5fd0b4afbe 100644
--- a/plugins/Login/tests/Integration/PasswordResetterTest.php
+++ b/plugins/Login/tests/Integration/PasswordResetterTest.php
@@ -146,10 +146,12 @@ class PasswordResetterTest extends IntegrationTestCase
'observers.global' => [
['Mail.send', function (Mail $mail) {
$body = $mail->getBodyHtml(true);
- preg_match('/resetToken=3D([a-zA-Z0-9=\s]+?)<\/p>/', $body, $matches);
- $capturedToken = $matches[1];
- $capturedToken = preg_replace('/=\s*/', '', $capturedToken);
- $this->capturedToken = $capturedToken;
+ preg_match('/resetToken=3D([a-zA-Z0-9=\s]+)<\/p>/', $body, $matches);
+ if (!empty($matches[1])) {
+ $capturedToken = $matches[1];
+ $capturedToken = preg_replace('/=\s*/', '', $capturedToken);
+ $this->capturedToken = $capturedToken;
+ }
}],
],
];