Skip to content
Snippets Groups Projects
Commit acd7dd9c authored by Larry Garfield's avatar Larry Garfield Committed by Alex Bronstein
Browse files

Switch to RedirectResponse for the /user page.

parent 26b46f8d
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -7,6 +7,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
......@@ -419,8 +420,8 @@ function user_cancel_confirm($account, $timestamp = 0, $hashed_pass = '') {
function user_page() {
global $user;
if ($user->uid) {
// @todo: Cleaner sub request handling.
drupal_goto('user/' . $user->uid);
$request = drupal_container()->get('request');
return new RedirectResponse($request->getUriForPath('/user/' . $user->uid));
}
else {
return drupal_get_form('user_login');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment