register OK
parent
8a0e27a287
commit
c486d83d3f
@ -1,16 +1,16 @@
|
||||
index:
|
||||
path: /
|
||||
controller: App\Controller\HomeController::index
|
||||
|
||||
login:
|
||||
path: /login
|
||||
controller: App\Controller\SecurityController::login
|
||||
methods: GET|POST
|
||||
|
||||
register:
|
||||
registerForm:
|
||||
path: /register
|
||||
controller: App\Controller\SecurityController::show_register_form
|
||||
methods: GET|POST
|
||||
controller: App\Controller\SecurityController::showRegisterForm
|
||||
methods: GET
|
||||
|
||||
register:
|
||||
path: /register
|
||||
controller: App\Controller\SecurityController::register
|
||||
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataFixtures;
|
||||
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||
|
||||
|
||||
|
||||
class UserFixtures extends Fixture
|
||||
{
|
||||
|
||||
private $passwordEncoder;
|
||||
|
||||
public function __construct(UserPasswordEncoderInterface $passwordEncoder)
|
||||
{
|
||||
$this->passwordEncoder = $passwordEncoder;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$user = new User();
|
||||
$user->setPassword($this->passwordEncoder->encodePassword(
|
||||
$user,
|
||||
'the_new_password'
|
||||
));
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue