Commit 85d1f76b authored by Jozef Vajdiar's avatar Jozef Vajdiar
Browse files

Update UserListener.php

parent 5d8e9b33
......@@ -11,7 +11,8 @@
namespace FOS\UserBundle\Doctrine;
use Doctrine\Common\EventSubscriber;
use Doctrine\Common\EventSubscriber;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ORM\EntityManager;
......@@ -19,6 +20,7 @@ use FOS\UserBundle\Model\UserInterface;
use FOS\UserBundle\Util\CanonicalFieldsUpdater;
use FOS\UserBundle\Util\PasswordUpdaterInterface;
use Doctrine\ORM\Event\PreUpdateEventArgs;
/**
* Doctrine listener updating the canonical username and password fields.
......@@ -64,9 +66,9 @@ class UserListener implements EventSubscriber
/**
* Pre update listener based on doctrine common.
*
* @param PreUpdateEventArgs $args
* @param PreUpdateEventArgs $args
*/
public function preUpdate(PreUpdateEventArgs $args)
public function preUpdate(PreUpdateEventArgs $args)
{
$object = $args->getObject();
if ($object instanceof UserInterface) {
......@@ -89,10 +91,10 @@ class UserListener implements EventSubscriber
/**
* Recomputes change set for Doctrine implementations not doing it automatically after the event.
*
* @param ObjectManager $om
* @param EntityManager $om
* @param UserInterface $user
*/
private function recomputeChangeSet(ObjectManager $om, UserInterface $user)
private function recomputeChangeSet(EntityManager $om, UserInterface $user)
{
$meta = $om->getClassMetadata(get_class($user));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment