File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/PlaygroundUser/Service Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -313,15 +313,21 @@ public function edit(array $data, $user)
313313 * Register the user (associated with a default). It can be a social registration
314314 *
315315 * @param array $data
316+ * @param string $formClass
316317 * @return \playgroundUser\Entity\UserInterface
317318 * @throws Exception\InvalidArgumentException
318319 */
319- public function register (array $ data )
320+ public function register (array $ data, $ formClass = false )
320321 {
321322 $ zfcUserOptions = $ this ->getServiceManager ()->get ('zfcuser_module_options ' );
322323 $ class = $ zfcUserOptions ->getUserEntityClass ();
323324 $ user = new $ class ;
324- $ form = $ this ->getRegisterForm ();
325+
326+ if ($ formClass ){
327+ $ form = $ this ->getServiceManager ()->get ($ formClass );
328+ } else {
329+ $ form = $ this ->getRegisterForm ();
330+ }
325331 $ form ->get ('dob ' )->setOptions (array ('format ' => 'Y-m-d ' ));
326332
327333 // Convert birth date format
You can’t perform that action at this time.
0 commit comments