Browse Source

Rendre la propriété token unique

François 6 years ago
parent
commit
f62a545529
2 changed files with 3 additions and 2 deletions
  1. 2 1
      app/Resources/views/base.html.twig
  2. 1 1
      src/AppBundle/Entity/User.php

+ 2 - 1
app/Resources/views/base.html.twig

@@ -35,8 +35,9 @@
 									<a class="dropdown-item" href="{{ path('admin_index') }}">Utilisateurs</a>
 									<div class="dropdown-divider"></div>
 									<a class="dropdown-item" href="{{ path('genre_liste') }}">Liste des genres</a>
-									<div class="dropdown-divider"></div>
+									{#<div class="dropdown-divider"></div>
 									<a class="dropdown-item" href="{{ path('admin_resettokens') }}">Reset Tokens</a>
+									#}
 								</div>
 							</li>
 						</ul>

+ 1 - 1
src/AppBundle/Entity/User.php

@@ -61,7 +61,7 @@ class User implements UserInterface
     /**
      * @var string
      *
-     * @ORM\Column(name="token", type="string", length=255)
+     * @ORM\Column(name="token", type="string", length=255, unique=true)
      */
     private $token;