Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4e58220

Browse filesBrowse files
committed
[#8192] use path() in PHP templates
1 parent bab1a69 commit 4e58220
Copy full SHA for 4e58220

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed

‎security/form_login.rst

Copy file name to clipboardExpand all lines: security/form_login.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ Defining the redirect URL via POST using a hidden form field:
179179
.. code-block:: html+php
180180

181181
<!-- app/Resources/views/security/login.html.php -->
182-
<form action="<?php echo $view['router']->generate('login') ?>" method="post">
182+
<form action="<?php echo $view['router']->path('login') ?>" method="post">
183183
// ...
184184

185-
<input type="hidden" name="_target_path" value="<?php echo $view['router']->generate('account') ?>" />
185+
<input type="hidden" name="_target_path" value="<?php echo $view['router']->path('account') ?>" />
186186
<input type="submit" name="login" />
187187
</form>
188188

@@ -336,7 +336,7 @@ This option can also be set via the ``_failure_path`` request parameter:
336336
<form action="<?php echo $view['router']->path('login') ?>" method="post">
337337
<!-- ... -->
338338

339-
<input type="hidden" name="_failure_path" value="<?php echo $view['router']->generate('forgot_password') ?>" />
339+
<input type="hidden" name="_failure_path" value="<?php echo $view['router']->path('forgot_password') ?>" />
340340
<input type="submit" name="login" />
341341
</form>
342342

@@ -423,10 +423,10 @@ are now fully customized:
423423
.. code-block:: html+php
424424

425425
<!-- app/Resources/views/security/login.html.php -->
426-
<form action="<?php echo $view['router']->generate('login') ?>" method="post">
426+
<form action="<?php echo $view['router']->path('login') ?>" method="post">
427427
<!-- ... -->
428428

429-
<input type="hidden" name="go_to" value="<?php echo $view['router']->generate('dashboard') ?>" />
430-
<input type="hidden" name="back_to" value="<?php echo $view['router']->generate('forgot_password') ?>" />
429+
<input type="hidden" name="go_to" value="<?php echo $view['router']->path('dashboard') ?>" />
430+
<input type="hidden" name="back_to" value="<?php echo $view['router']->path('forgot_password') ?>" />
431431
<input type="submit" name="login" />
432432
</form>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.