I have a problem with account cancellation. The proccess itself executes fine, but after the batch proccess runs, the user isn't redirected to the front page as mentioned in the
user_cancel($edit, $user->id(), $account_data['cancel_method']); // 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('');
This results in 403 error, as anonymous users don't have access to
en/user/2/cancel/confirm/... path. I tested in in 2 different sites, using Drupal 8.2 and 8.3
How can I redirect user properly in this situation?