mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Fixed some deprecations.
This commit is contained in:
parent
2a332b28a7
commit
193ecd252b
12 changed files with 66 additions and 24 deletions
|
@ -52,7 +52,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
|||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
|
||||
class SetPasswordCommand extends Command
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ class SetPasswordCommand extends Command
|
|||
protected $encoder;
|
||||
protected $eventDispatcher;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager, UserPasswordEncoderInterface $passwordEncoder, EventDispatcherInterface $eventDispatcher)
|
||||
public function __construct(EntityManagerInterface $entityManager, UserPasswordHasherInterface $passwordEncoder, EventDispatcherInterface $eventDispatcher)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
$this->encoder = $passwordEncoder;
|
||||
|
@ -122,7 +122,7 @@ class SetPasswordCommand extends Command
|
|||
}
|
||||
|
||||
//Encode password
|
||||
$hash = $this->encoder->encodePassword($user, $new_password);
|
||||
$hash = $this->encoder->hashPassword($user, $new_password);
|
||||
$user->setPassword($hash);
|
||||
|
||||
//And save it to databae
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue