I'd like users registering on my website are redirected to the page where they clicked the "create account" button which is in a modal.
First, I tried to redirect to an absolute url I tried
$_REQUEST['destination'] = '<front>';
I tried this too :
$response = new \Drupal\Core\Routing\TrustedRedirectResponse('http://www.google.be'); $form_state->setResponse($response);
I'm always redirected to /user/[uid]/edit