Fixed relationship between user and userdata.
This commit is contained in:
@@ -61,7 +61,7 @@ class DefaultController extends Controller
|
||||
$form->bindRequest($request);
|
||||
if ($form->isValid())
|
||||
{
|
||||
if ($this->getPassword() == '')
|
||||
if ($user->getPassword() == '')
|
||||
$user->setPassword($oldPassword);
|
||||
else
|
||||
$user->setPassword($this->get('security.encoder_factory')->getEncoder($user)->encodePassword($user->getPassword(), $user->getSalt()));
|
||||
|
@@ -26,7 +26,8 @@ class UserData
|
||||
/**
|
||||
* @var KekRozsak\SecurityBundle\Entity\User $user
|
||||
* @ORM\Id
|
||||
* @ORM\OneToOne(targetEntity="KekRozsak\SecurityBundle\Entity\User")
|
||||
* @ORM\GeneratedValue(strategy="NONE")
|
||||
* @ORM\OneToOne(targetEntity="KekRozsak\SecurityBundle\Entity\User", inversedBy="userData")
|
||||
* @ORM\JoinColumn(name="user_id")
|
||||
*/
|
||||
protected $user;
|
||||
|
Reference in New Issue
Block a user