Optimized login procedure

This commit is contained in:
Kevin Frantz 2018-09-06 16:52:20 +02:00
parent 0c689194a2
commit ecd6bfaac1
4 changed files with 9 additions and 4 deletions

View File

@ -8,7 +8,6 @@ security:
entity:
class: App\Entity\User
property: username
#in_memory: { memory: ~ }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/

View File

@ -1,6 +1,7 @@
{% extends "base.html.twig" %}
{% block body %}
{% include 'frames/structure/navbar.html.twig'%}
{% include 'frames/structure/message/flash_messages.html.twig'%}
<br />
<div class="container">
{% block content %}

View File

@ -0,0 +1,5 @@
{% for message in app.flashes('notice') %}
<div class="flash-notice">
{{ message }}
</div>
{% endfor %}

View File

@ -6,16 +6,16 @@
<h1>
{% trans %}login{% endtrans %}
</h1>
<form method={{ path('login') }}>
<form action={{ path('login') }} method="post">
<div class="form-group">
<label for="username">{% trans %}Username{% endtrans %}</label> <input
type="username" name="username" class="form-control" id="username"
type="username" name="_username" class="form-control" id="username"
aria-describedby="usernameHelp"
placeholder="{% trans %}Enter username{% endtrans %}'">
</div>
<div class="form-group">
<label for="password">{% trans %}Password{% endtrans %}</label> <input
type="password" name="password" class="form-control" id="password"
type="password" name="_password" class="form-control" id="password"
placeholder="{% trans %}Password{% endtrans %}">
</div>
<button type="submit" class="btn btn-primary">