Skip to content

Commit af17740

Browse files
committed
minor #17137 Avoiding the term "login form"... (ThomasLandauer)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Avoiding the term "login form"... ...since we're not talking about a "usual" login form (i.e. username+password) here. Commits ------- c9d05e8 Avoiding the term "login form"...
2 parents 1f1d6a4 + c9d05e8 commit af17740

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
@@ -20,9 +20,8 @@ my password, etc.)
2020
Using the Login Link Authenticator
2121
----------------------------------
2222

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

2726
1) Configure the Login Link Authenticator
2827
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -160,9 +159,8 @@ intercept requests to this route:
160159
2) Generate the Login Link
161160
~~~~~~~~~~~~~~~~~~~~~~~~~~
162161

163-
Now that the authenticator is able to check the login links, you must
164-
create a page where a user can request a login link and log in to your
165-
website.
162+
Now that the authenticator is able to check the login links, you can
163+
create a page where a user can request a login link.
166164

167165
The login link can be generated using the
168166
:class:`Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkHandlerInterface`.
@@ -185,7 +183,7 @@ this interface::
185183
*/
186184
public function requestLoginLink(LoginLinkHandlerInterface $loginLinkHandler, UserRepository $userRepository, Request $request)
187185
{
188-
// check if login form is submitted
186+
// check if form is submitted
189187
if ($request->isMethod('POST')) {
190188
// load the user in some way (e.g. using the form input)
191189
$email = $request->request->get('email');
@@ -199,16 +197,16 @@ this interface::
199197
// ... send the link and return a response (see next section)
200198
}
201199

202-
// if it's not submitted, render the "login" form
203-
return $this->render('security/login.html.twig');
200+
// if it's not submitted, render the "request" form
201+
return $this->render('security/request_login_link.html.twig');
204202
}
205203

206204
// ...
207205
}
208206

209207
.. code-block:: html+twig
210208

211-
{# templates/security/login.html.twig #}
209+
{# templates/security/request_login_link.html.twig #}
212210
{% extends 'base.html.twig' %}
213211

214212
{% block body %}
@@ -824,7 +822,7 @@ features such as the locale used to generate the link::
824822
// ...
825823
}
826824

827-
return $this->render('security/login.html.twig');
825+
return $this->render('security/request_login_link.html.twig');
828826
}
829827

830828
// ...

0 commit comments

Comments
 (0)