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
$_REQUEST('destination') = '<front>';
I tried this too :
$response = new DrupalCoreRoutingTrustedRedirectResponse('http://www.google.be'); $form_state->setResponse($response);
I’m always redirected to /user/(uid)/edit