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: entity:
class: App\Entity\User class: App\Entity\User
property: username property: username
#in_memory: { memory: ~ }
firewalls: firewalls:
dev: dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/ pattern: ^/(_(profiler|wdt)|css|images|js)/

View File

@ -1,6 +1,7 @@
{% extends "base.html.twig" %} {% extends "base.html.twig" %}
{% block body %} {% block body %}
{% include 'frames/structure/navbar.html.twig'%} {% include 'frames/structure/navbar.html.twig'%}
{% include 'frames/structure/message/flash_messages.html.twig'%}
<br /> <br />
<div class="container"> <div class="container">
{% block content %} {% 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> <h1>
{% trans %}login{% endtrans %} {% trans %}login{% endtrans %}
</h1> </h1>
<form method={{ path('login') }}> <form action={{ path('login') }} method="post">
<div class="form-group"> <div class="form-group">
<label for="username">{% trans %}Username{% endtrans %}</label> <input <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" aria-describedby="usernameHelp"
placeholder="{% trans %}Enter username{% endtrans %}'"> placeholder="{% trans %}Enter username{% endtrans %}'">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="password">{% trans %}Password{% endtrans %}</label> <input <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 %}"> placeholder="{% trans %}Password{% endtrans %}">
</div> </div>
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">