Skip to content

Commit e85d63b

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: Avoiding the term "login form"...
2 parents 923b844 + a1c346b commit e85d63b

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

security/login_link.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ my password, etc.)
1313
Using the Login Link Authenticator
1414
----------------------------------
1515

16-
This guide assumes you have setup security and have created a user object
17-
in your application. Follow :doc:`the main security guide </security>` if
18-
this is not yet the case.
16+
This guide assumes you have :doc:`setup security and have created a user object </security>`
17+
in your application.
1918

2019
1) Configure the Login Link Authenticator
2120
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -134,9 +133,8 @@ intercept requests to this route:
134133
2) Generate the Login Link
135134
~~~~~~~~~~~~~~~~~~~~~~~~~~
136135

137-
Now that the authenticator is able to check the login links, you must
138-
create a page where a user can request a login link and log in to your
139-
website.
136+
Now that the authenticator is able to check the login links, you can
137+
create a page where a user can request a login link.
140138

141139
The login link can be generated using the
142140
:class:`Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkHandlerInterface`.
@@ -158,7 +156,7 @@ this interface::
158156
#[Route('/login', name: 'login')]
159157
public function requestLoginLink(LoginLinkHandlerInterface $loginLinkHandler, UserRepository $userRepository, Request $request): Response
160158
{
161-
// check if login form is submitted
159+
// check if form is submitted
162160
if ($request->isMethod('POST')) {
163161
// load the user in some way (e.g. using the form input)
164162
$email = $request->request->get('email');
@@ -172,16 +170,16 @@ this interface::
172170
// ... send the link and return a response (see next section)
173171
}
174172

175-
// if it's not submitted, render the "login" form
176-
return $this->render('security/login.html.twig');
173+
// if it's not submitted, render the form to request the "login link"
174+
return $this->render('security/request_login_link.html.twig');
177175
}
178176

179177
// ...
180178
}
181179

182180
.. code-block:: html+twig
183181

184-
{# templates/security/login.html.twig #}
182+
{# templates/security/request_login_link.html.twig #}
185183
{% extends 'base.html.twig' %}
186184

187185
{% block body %}
@@ -793,7 +791,7 @@ features such as the locale used to generate the link::
793791
// ...
794792
}
795793

796-
return $this->render('security/login.html.twig');
794+
return $this->render('security/request_login_link.html.twig');
797795
}
798796

799797
// ...

0 commit comments

Comments
 (0)