Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
liverbool committed Feb 29, 2016
1 parent 00b1ae4 commit 5ac7c0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions EventListener/DefaultUsernameListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function onFlush(OnFlushEventArgs $onFlushEventArgs)

if (null !== $user && $user->getUsername() === null) {
$user->setUsername($entity->getEmail());
$user->setUsernameCanonical($user->getEmail());
$entityManager->persist($user);
$userMetadata = $entityManager->getClassMetadata(get_class($user));
$unitOfWork->recomputeSingleEntityChangeSet($userMetadata, $user);
Expand Down

0 comments on commit 5ac7c0f

Please sign in to comment.