Skip to content

Commit a19cf64

Browse files
committed
Add userId to ZfcUserForm if it's not present
Closes #22
1 parent 158fc2c commit a19cf64

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/LdcUserProfile/Extensions/ZfcUser/ZfcUserForm.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ public function __construct(RegistrationOptionsInterface $registrationOptions)
2020
{
2121
$this->setRegistrationOptions($registrationOptions);
2222
parent::__construct(null, $registrationOptions);
23+
24+
if (!$this->has('userId')) {
25+
$this->add(array(
26+
'name' => 'userId',
27+
'type' => 'Zend\Form\Element\Hidden',
28+
'attributes' => array(
29+
'type' => 'hidden',
30+
),
31+
));
32+
}
2333
}
2434

2535
/**

0 commit comments

Comments
 (0)