File tree Expand file tree Collapse file tree 4 files changed +5
-19
lines changed Expand file tree Collapse file tree 4 files changed +5
-19
lines changed Original file line number Diff line number Diff line change 18
18
{{ render(controller(' AppBundle:Blog:commentForm' , { ' id' : post .id })) }}
19
19
{% else %}
20
20
<p >
21
- <a class =" btn btn-success" href =" {{ path(' security_login_form ' ) }}" >
21
+ <a class =" btn btn-success" href =" {{ path(' security_login ' ) }}" >
22
22
<i class =" fa fa-sign-in" ></i > {{ ' action.sign_in' | trans }}
23
23
</a >
24
24
{{ ' post.to_publish_a_comment' | trans }}
Original file line number Diff line number Diff line change 12
12
<div class =" row" >
13
13
<div class =" col-sm-5" >
14
14
<div class =" well" >
15
- <form action =" {{ path(' security_login_check ' ) }}" method =" post" >
15
+ <form action =" {{ path(' security_login ' ) }}" method =" post" >
16
16
<fieldset >
17
17
<legend ><i class =" fa fa-lock" ></i > {{ ' title.login' | trans }}</legend >
18
18
<div class =" form-group" >
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ security:
25
25
# Reference: http://symfony.com/doc/current/cookbook/security/form_login_setup.html
26
26
form_login :
27
27
# The route name that the login form submits to
28
- check_path : security_login_check
28
+ check_path : security_login
29
29
# The name of the route where the login form lives
30
30
# When the user tries to access a protected page, they are redirected here
31
- login_path : security_login_form
31
+ login_path : security_login
32
32
# Secure the login form against CSRF
33
33
# Reference: http://symfony.com/doc/current/cookbook/security/csrf_in_login_form.html
34
34
csrf_token_generator : security.csrf.token_manager
Original file line number Diff line number Diff line change 25
25
class SecurityController extends Controller
26
26
{
27
27
/**
28
- * @Route("/login", name="security_login_form")
29
- * @Method("GET")
28
+ * @Route("/login", name="security_login")
30
29
*/
31
30
public function loginAction ()
32
31
{
@@ -40,19 +39,6 @@ public function loginAction()
40
39
));
41
40
}
42
41
43
- /**
44
- * This is the route the login form submits to.
45
- *
46
- * But, this will never be executed. Symfony will intercept this first
47
- * and handle the login automatically. See form_login in app/config/security.yml
48
- *
49
- * @Route("/login_check", name="security_login_check")
50
- */
51
- public function loginCheckAction ()
52
- {
53
- throw new \Exception ('This should never be reached! ' );
54
- }
55
-
56
42
/**
57
43
* This is the route the user can use to logout.
58
44
*
You can’t perform that action at this time.
0 commit comments