Skip to content

Commit f09c0c2

Browse files
committed
Tweaks
1 parent ba0e2a4 commit f09c0c2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

security.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,15 +1657,19 @@ You can log in a user programmatically using the ``login()`` method of the
16571657
// you can also log in on a different firewall
16581658
$security->login($user, 'form_login', 'other_firewall');
16591659

1660-
// use the redirection logic applied to regular login,
1660+
// use the redirection logic applied to regular login
16611661
$redirectResponse = $security->login($user);
16621662
return $redirectResponse;
1663-
// or use a specific redirection logic
1664-
// (redirect the user to its account page for instance)
1665-
// ...
1663+
1664+
// or use a custom redirection logic (e.g. redirect users to their account page)
1665+
// return new RedirectResponse('...');
16661666
}
16671667
}
16681668

1669+
.. versionadded:: 6.3
1670+
1671+
The feature to use a custom redirection logic was introduced in Symfony 6.3.
1672+
16691673
.. _security-logging-out:
16701674

16711675
Logging Out

0 commit comments

Comments
 (0)