Skip to content

Instantly share code, notes, and snippets.

@jwage
Created February 6, 2011 18:49
Show Gist options
  • Save jwage/813600 to your computer and use it in GitHub Desktop.
Save jwage/813600 to your computer and use it in GitHub Desktop.
public function register()
{
// ...
$user = new User();
$form = new RegisterForm('register', $user, $validator);
$form->bind($request, $user);
if ($form->isValid()) {
$newUser = new NewUser($user);
$dm->persist($newUser);
$dm->persist($user);
$dm->flush();
// ...
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment