Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,12 @@ You can log in a user programmatically using the ``login()`` method of the
// you can also log in on a different firewall
$security->login($user, 'form_login', 'other_firewall');

// ... redirect the user, e.g. to their account page
// use the redirection logic applied to regular login,
$redirectResponse = $security->login($user);
return $redirectResponse;
// or use a specific redirection logic
// (redirect the user to its account page for instance)
// ...
}
}

Expand Down