Registration and login perfect
This commit is contained in:
@@ -4,8 +4,11 @@ security:
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||
providers:
|
||||
# used to reload user from session & other features (e.g. switch_user)
|
||||
app_user_provider:
|
||||
id: App\Security\UserProvider
|
||||
entity:
|
||||
class: App\Entity\Participant
|
||||
property: email
|
||||
# used to reload user from session & other features (e.g. switch_user)
|
||||
# used to reload user from session & other features (e.g. switch_user)
|
||||
firewalls:
|
||||
@@ -15,6 +18,8 @@ security:
|
||||
main:
|
||||
lazy: true
|
||||
provider: app_user_provider
|
||||
custom_authenticators:
|
||||
- App\Security\LoginFormAuthenticator
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
|
||||
@@ -7,9 +7,6 @@ parameters:
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
App\Security\UserProvider:
|
||||
arguments:
|
||||
$entityManager: '@doctrine.orm.entity_manager'
|
||||
_defaults:
|
||||
autowire: true # Automatically injects dependencies in your services.
|
||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241119101414 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE etat (id_etat CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', libelle VARCHAR(255) NOT NULL, PRIMARY KEY(id_etat)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE lieu (id_lieu CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', id_ville CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', nom VARCHAR(255) NOT NULL, rue VARCHAR(255) DEFAULT NULL, latitude DOUBLE PRECISION DEFAULT NULL, longitude DOUBLE PRECISION DEFAULT NULL, INDEX IDX_2F577D59AD4698F3 (id_ville), PRIMARY KEY(id_lieu)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE participant (id_participant CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', id_site CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', nom VARCHAR(255) NOT NULL, prenom VARCHAR(255) NOT NULL, telephone VARCHAR(255) DEFAULT NULL, email VARCHAR(255) NOT NULL, administrateur TINYINT(1) NOT NULL, actif TINYINT(1) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, INDEX IDX_D79F6B11E26315E6 (id_site), UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL (email), PRIMARY KEY(id_participant)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE site (id_site CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', nom VARCHAR(255) NOT NULL, PRIMARY KEY(id_site)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE sortie (id_sortie CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', id_site CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', id_participant CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', id_lieu CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', id_etat CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', nom VARCHAR(255) NOT NULL, date_heure_debut DATE DEFAULT NULL, duree INT DEFAULT NULL, date_limite_inscription DATE DEFAULT NULL, nb_inscriptions_max INT DEFAULT NULL, infos_sortie VARCHAR(255) DEFAULT NULL, INDEX IDX_3C3FD3F2E26315E6 (id_site), INDEX IDX_3C3FD3F2CF8DA6E6 (id_participant), INDEX IDX_3C3FD3F2A477615B (id_lieu), INDEX IDX_3C3FD3F2DEEAEB60 (id_etat), PRIMARY KEY(id_sortie)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE ville (id_ville CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', nom VARCHAR(255) NOT NULL, code_postal INT DEFAULT NULL, PRIMARY KEY(id_ville)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE lieu ADD CONSTRAINT FK_2F577D59AD4698F3 FOREIGN KEY (id_ville) REFERENCES ville (idVille)');
|
||||
$this->addSql('ALTER TABLE participant ADD CONSTRAINT FK_D79F6B11E26315E6 FOREIGN KEY (id_site) REFERENCES site (idSite)');
|
||||
$this->addSql('ALTER TABLE sortie ADD CONSTRAINT FK_3C3FD3F2E26315E6 FOREIGN KEY (id_site) REFERENCES site (idSite)');
|
||||
$this->addSql('ALTER TABLE sortie ADD CONSTRAINT FK_3C3FD3F2CF8DA6E6 FOREIGN KEY (id_participant) REFERENCES participant (idParticipant)');
|
||||
$this->addSql('ALTER TABLE sortie ADD CONSTRAINT FK_3C3FD3F2A477615B FOREIGN KEY (id_lieu) REFERENCES lieu (idLieu)');
|
||||
$this->addSql('ALTER TABLE sortie ADD CONSTRAINT FK_3C3FD3F2DEEAEB60 FOREIGN KEY (id_etat) REFERENCES etat (idEtat)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE lieu DROP FOREIGN KEY FK_2F577D59AD4698F3');
|
||||
$this->addSql('ALTER TABLE participant DROP FOREIGN KEY FK_D79F6B11E26315E6');
|
||||
$this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F2E26315E6');
|
||||
$this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F2CF8DA6E6');
|
||||
$this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F2A477615B');
|
||||
$this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F2DEEAEB60');
|
||||
$this->addSql('DROP TABLE etat');
|
||||
$this->addSql('DROP TABLE lieu');
|
||||
$this->addSql('DROP TABLE participant');
|
||||
$this->addSql('DROP TABLE site');
|
||||
$this->addSql('DROP TABLE sortie');
|
||||
$this->addSql('DROP TABLE ville');
|
||||
$this->addSql('DROP TABLE messenger_messages');
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241119102815 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE lieu DROP FOREIGN KEY FK_2F577D59AD4698F3');
|
||||
$this->addSql('DROP INDEX IDX_2F577D59AD4698F3 ON lieu');
|
||||
$this->addSql('ALTER TABLE lieu CHANGE id_ville ville_id CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\'');
|
||||
$this->addSql('ALTER TABLE lieu ADD CONSTRAINT FK_2F577D59A73F0036 FOREIGN KEY (ville_id) REFERENCES ville (id_ville)');
|
||||
$this->addSql('CREATE INDEX IDX_2F577D59A73F0036 ON lieu (ville_id)');
|
||||
$this->addSql('DROP INDEX IDX_3C3FD3F2CF8DA6E6 ON sortie');
|
||||
$this->addSql('DROP INDEX IDX_3C3FD3F2A477615B ON sortie');
|
||||
$this->addSql('DROP INDEX IDX_3C3FD3F2DEEAEB60 ON sortie');
|
||||
$this->addSql('ALTER TABLE sortie ADD participant_id CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ADD lieu_id CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ADD etat_id CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', DROP id_participant, DROP id_lieu, DROP id_etat');
|
||||
$this->addSql('ALTER TABLE sortie ADD CONSTRAINT FK_3C3FD3F29D1C3019 FOREIGN KEY (participant_id) REFERENCES participant (id_participant)');
|
||||
$this->addSql('ALTER TABLE sortie ADD CONSTRAINT FK_3C3FD3F26AB213CC FOREIGN KEY (lieu_id) REFERENCES lieu (id_lieu)');
|
||||
$this->addSql('ALTER TABLE sortie ADD CONSTRAINT FK_3C3FD3F2D5E86FF FOREIGN KEY (etat_id) REFERENCES etat (id_etat)');
|
||||
$this->addSql('CREATE INDEX IDX_3C3FD3F29D1C3019 ON sortie (participant_id)');
|
||||
$this->addSql('CREATE INDEX IDX_3C3FD3F26AB213CC ON sortie (lieu_id)');
|
||||
$this->addSql('CREATE INDEX IDX_3C3FD3F2D5E86FF ON sortie (etat_id)');
|
||||
$this->addSql('ALTER TABLE sortie RENAME INDEX fk_3c3fd3f2f6bd1646 TO IDX_3C3FD3F2F6BD1646');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE lieu DROP FOREIGN KEY FK_2F577D59A73F0036');
|
||||
$this->addSql('DROP INDEX IDX_2F577D59A73F0036 ON lieu');
|
||||
$this->addSql('ALTER TABLE lieu CHANGE ville_id id_ville CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\'');
|
||||
$this->addSql('ALTER TABLE lieu ADD CONSTRAINT FK_2F577D59AD4698F3 FOREIGN KEY (id_ville) REFERENCES ville (id_ville) ON UPDATE NO ACTION ON DELETE NO ACTION');
|
||||
$this->addSql('CREATE INDEX IDX_2F577D59AD4698F3 ON lieu (id_ville)');
|
||||
$this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F29D1C3019');
|
||||
$this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F26AB213CC');
|
||||
$this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F2D5E86FF');
|
||||
$this->addSql('DROP INDEX IDX_3C3FD3F29D1C3019 ON sortie');
|
||||
$this->addSql('DROP INDEX IDX_3C3FD3F26AB213CC ON sortie');
|
||||
$this->addSql('DROP INDEX IDX_3C3FD3F2D5E86FF ON sortie');
|
||||
$this->addSql('ALTER TABLE sortie ADD id_participant CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ADD id_lieu CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ADD id_etat CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', DROP participant_id, DROP lieu_id, DROP etat_id');
|
||||
$this->addSql('CREATE INDEX IDX_3C3FD3F2CF8DA6E6 ON sortie (id_participant)');
|
||||
$this->addSql('CREATE INDEX IDX_3C3FD3F2A477615B ON sortie (id_lieu)');
|
||||
$this->addSql('CREATE INDEX IDX_3C3FD3F2DEEAEB60 ON sortie (id_etat)');
|
||||
$this->addSql('ALTER TABLE sortie RENAME INDEX idx_3c3fd3f2f6bd1646 TO FK_3C3FD3F2F6BD1646');
|
||||
}
|
||||
}
|
||||
31
migrations/Version20241119145530.php
Normal file
31
migrations/Version20241119145530.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241119145530 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_PSEUDO ON participant (pseudo)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_PSEUDO ON participant');
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\Participant;
|
||||
use App\Form\RegistrationFormType;
|
||||
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
|
||||
use Doctrine\DBAL\Schema\Exception\UniqueConstraintDoesNotExist;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
@@ -35,8 +37,13 @@ class RegistrationController extends AbstractController
|
||||
$user->setAdministrateur(false);
|
||||
}
|
||||
|
||||
$entityManager->persist($user);
|
||||
$entityManager->flush();
|
||||
try {
|
||||
$entityManager->persist($user);
|
||||
$entityManager->flush();
|
||||
} catch (UniqueConstraintViolationException $e) {
|
||||
$this->addFlash('error', 'Cet email ou pseudo est déjà utilisé, veuillez en choisir un autre.');
|
||||
return $this->redirectToRoute('app_register');
|
||||
}
|
||||
|
||||
// do anything else you need here, like send an email
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: ParticipantRepository::class)]
|
||||
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL', fields: ['email'])]
|
||||
@@ -134,7 +133,7 @@ class Participant implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
*/
|
||||
public function getUserIdentifier(): string
|
||||
{
|
||||
return (string) $this->email;
|
||||
return (string) $this->pseudo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
69
src/Security/LoginFormAuthenticator.php
Normal file
69
src/Security/LoginFormAuthenticator.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Security;
|
||||
|
||||
use App\Entity\Participant;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Http\Authenticator\AbstractAuthenticator;
|
||||
use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials;
|
||||
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
|
||||
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
|
||||
class LoginFormAuthenticator extends AbstractAuthenticator
|
||||
{
|
||||
private $entityManager;
|
||||
private $urlGenerator;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager, UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
}
|
||||
|
||||
public function supports(Request $request): ?bool
|
||||
{
|
||||
return $request->getPathInfo() === '/login' && $request->isMethod('POST');
|
||||
}
|
||||
|
||||
public function authenticate(Request $request): Passport
|
||||
{
|
||||
$identifier = $request->request->get('username');
|
||||
$password = $request->request->get('password');
|
||||
|
||||
// Chercher l'utilisateur par email ou pseudo
|
||||
$user = $this->entityManager->getRepository(Participant::class)->findOneBy([
|
||||
'email' => $identifier
|
||||
]) ?? $this->entityManager->getRepository(Participant::class)->findOneBy([
|
||||
'pseudo' => $identifier
|
||||
]);
|
||||
|
||||
if (!$user) {
|
||||
throw new AuthenticationException('Identifiant ou mot de passe incorrect.');
|
||||
}
|
||||
|
||||
// Utilisation de UserBadge au lieu de Participant directement
|
||||
return new Passport(
|
||||
new UserBadge($user->getEmail()), // Utilisation de l'email ou du pseudo pour l'identification
|
||||
new PasswordCredentials($password) // Ajout du mot de passe pour la vérification
|
||||
);
|
||||
}
|
||||
|
||||
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?RedirectResponse
|
||||
{
|
||||
return new RedirectResponse($this->urlGenerator->generate('home'));
|
||||
}
|
||||
|
||||
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?RedirectResponse
|
||||
{
|
||||
return new RedirectResponse($this->urlGenerator->generate('app_login'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Security;
|
||||
|
||||
use App\Entity\Participant;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
//use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
||||
|
||||
class UserProvider implements UserProviderInterface
|
||||
{
|
||||
private $entityManager;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
public function loadUserByIdentifier(string $username): UserInterface
|
||||
{
|
||||
// Cherche par email ou pseudo
|
||||
$user = $this->entityManager->getRepository(Participant::class)
|
||||
->findOneBy(['email' => $username]) // Cherche par email
|
||||
?? $this->entityManager->getRepository(Participant::class)
|
||||
->findOneBy(['pseudo' => $username]); // Ou par pseudo
|
||||
|
||||
if (!$user) {
|
||||
throw new UsernameNotFoundException('Utilisateur non trouvé');
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function refreshUser(UserInterface $user): UserInterface
|
||||
{
|
||||
// Permet de rafraîchir les données d'un utilisateur (pas toujours nécessaire)
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function supportsClass(string $class): bool
|
||||
{
|
||||
return Participant::class === $class;
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,9 @@
|
||||
<h2 class="text-2xl font-bold text-center pb-6">Connectez-vous !</h2>
|
||||
<form action="{{ path('app_login') }}" method="post">
|
||||
<label class="text-gray-700 font-bold" for="username">Email ou pseudo</label>
|
||||
<input class="w-full mb-4 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Adresse e-mail ou pseudo" type="email" value="{{ last_username }}" name="_username" id="username" autocomplete="email" required autofocus>
|
||||
<input class="w-full mb-4 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Adresse e-mail ou pseudo" type="text" value="{{ last_username }}" name="username" id="username" autocomplete="email" required autofocus>
|
||||
<label class="text-gray-700 font-bold" for="password">Mot de passe</label>
|
||||
<input class="w-full mb-4 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Mot de passe" type="password" name="_password" id="password" autocomplete="current-password" required>
|
||||
<input class="w-full mb-4 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Mot de passe" type="password" name="password" id="password" autocomplete="current-password" required>
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me" checked>
|
||||
Se souvenir de moi
|
||||
|
||||
Reference in New Issue
Block a user