Skip to content

Commit

Permalink
Add userId to ZfcUserForm if it's not present
Browse files Browse the repository at this point in the history
Closes #22
  • Loading branch information
adamlundrigan committed Dec 14, 2014
1 parent 158fc2c commit a19cf64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/LdcUserProfile/Extensions/ZfcUser/ZfcUserForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ public function __construct(RegistrationOptionsInterface $registrationOptions)
{
$this->setRegistrationOptions($registrationOptions);
parent::__construct(null, $registrationOptions);

if (!$this->has('userId')) {
$this->add(array(
'name' => 'userId',
'type' => 'Zend\Form\Element\Hidden',
'attributes' => array(
'type' => 'hidden',
),
));
}
}

/**
Expand Down

0 comments on commit a19cf64

Please sign in to comment.