public function newAction(Request $request, $hash)
    {
        $passwordHelper = $this->get('orkestra.application.helper.password');
        $hashedEntityHelper = $this->get('orkestra.application.helper.hashed_entity');
        $hashedEntity = $passwordHelper->lookup($hash);
        if (!$hashedEntity) {
            throw new EntityNotFoundException();
        }
        $user = $hashedEntity->getReferencedObject();
        $hashedEntityHelper->invalidate($hashedEntity);

        $em = $this->getDoctrine()->getManager();
        $em->persist($hashedEntity);
        $em->flush();

        if ($user) {
            $request->getSession()->set(PasswordSetController::CURRENT_USER_ID_KEY, $user->getId());
            $form = $this->getSetPasswordForm();

            return array(
                'form' => $form->createView()
            );
        } else {
            throw $this->createNotFoundException('No user was found.');
        }

    }