diff --git a/core/modules/user/src/Controller/UserController.php b/core/modules/user/src/Controller/UserController.php index be15fac..4ea8460 100644 --- a/core/modules/user/src/Controller/UserController.php +++ b/core/modules/user/src/Controller/UserController.php @@ -312,7 +312,7 @@ public function confirmCancel(UserInterface $user, $timestamp = 0, $hashed_pass // Since user_cancel() is not invoked via Form API, batch processing // needs to be invoked manually and should redirect to the front page // after completion. - return batch_process(''); + return batch_process(''); } else { drupal_set_message(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'), 'error'); diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/src/Tests/UserCancelTest.php index a74626e..30daf71 100644 --- a/core/modules/user/src/Tests/UserCancelTest.php +++ b/core/modules/user/src/Tests/UserCancelTest.php @@ -286,6 +286,9 @@ public function testUserBlockUnpublish() { // Confirm that the confirmation message made it through to the end user. $this->assertRaw(t('%name has been disabled.', ['%name' => $account->getUsername()]), "Confirmation message displayed to user."); + + // Confirm that the user was redirected to the front page. + $this->assertUrl(''); } /**